Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.2.0
-
Observed on:
- Windows 7 64-bit, with ANGLE build
- Mac OS 10.8.5
Description
If you run the following QML and resize the window, you will see that the blue rectangle gets clipped by a region which doesn't correspond to the desired clipping region (indicated by the red outline).
import QtQuick 2.0 Canvas { id: canvas height: 200 width: 200 onPaint: { var ctx = canvas.getContext('2d') ctx.clearRect(0, 0, width, height) ctx.save() ctx.beginPath(); ctx.rect(0, 0, width/2, height/2); ctx.strokeStyle = "red"; ctx.stroke(); ctx.clip(); ctx.fillStyle = "blue" ctx.fillRect(0, 0, width, height); ctx.restore() } }
This was already described by RickyKeith here: http://qt-project.org/forums/viewthread/37152/