[Interest] QML Context2D createPattern not working when using an Image item

BOUCARD Olivier boucard_olivier at yahoo.fr
Sat Feb 27 20:16:57 CET 2016


Hi,

On Qt 5.5.1 MinGW 32bit.


I'm making some test with the QML Canvas.
And I was trying to fill a rectangle with a PNG as pattern.
My Image is loaded using a QML Image item.
My drawing commands are in a separate Javascript file.
I access the image by adding an alias property to the Canvas pointing to the Image item.
I do this to simplify access in the Javascript file.
If I call drawImage using the alias it is working.
If I create a pattern using the same alias, set fillStyle and draw a rectangle, nothing is drawn.
If I create a pattern using the URL of the image then it works.

Is there something I missed or should I fill a bug report?

Thanks



More information about the Interest mailing list