aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-04-30 15:06:40 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-03 16:27:49 +0200
commit98023c7eba3205b85b2ad0c107ce72072a2b0bba (patch)
tree0499b725eed8d95c3825991608fc3879b20c1ae6 /examples
parentee677dc8d85b36990d67e1be0e6e3187fd6b6a78 (diff)
Canvas: Do not apply transform to text twice
The path already has the transform, no need to apply it a second time manually. Task-number: QTBUG-30501 Change-Id: Iedcb2e2f85a1f9eeac8e6264e00536c43bf16ddb Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml b/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml
index 0756d339ff..69e703cca7 100644
--- a/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml
+++ b/examples/quick/canvas/quadraticCurveTo/quadraticCurveTo.qml
@@ -116,13 +116,12 @@ Item {
if (canvas.stroke)
ctx.stroke();
- ctx.restore();
-
// ![1]
ctx.fillStyle = "white";
ctx.font = "Bold 17px";
- ctx.fillText("Qt Quick", 110, 140);
+ ctx.fillText("Qt Quick", 40, 70);
// ![1]
+ ctx.restore();
}
}
}