diff options
Diffstat (limited to 'examples/declarative/canvas/stockchart/stock.qml')
-rw-r--r-- | examples/declarative/canvas/stockchart/stock.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/declarative/canvas/stockchart/stock.qml b/examples/declarative/canvas/stockchart/stock.qml index d02f07bc38..1c95fde2ce 100644 --- a/examples/declarative/canvas/stockchart/stock.qml +++ b/examples/declarative/canvas/stockchart/stock.qml @@ -688,7 +688,7 @@ Rectangle { //console.log("painting... first:" + first + ", last:" + last + " current:" + view.currentIndex); var ctx = canvas.getContext("2d"); - ctx.reset(); + ctx.save(); ctx.globalCompositeOperation = "source-over"; ctx.lineWidth = 1; @@ -720,6 +720,7 @@ Rectangle { drawPrice(ctx, first, last, Qt.rgba(0.5, 0.5, 0.5, 1),"close", points, highestPrice); drawVolume(ctx, first, last, Qt.rgba(0.3, 0.5, 0.7, 1),"volume", points, highestValume); drawKLine(ctx, first, last, points, highestPrice); + ctx.restore(); } } -}
\ No newline at end of file +} |