Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.0.2
-
None
Description
The documentation states that QtQuick 2.0 Canvas has the method getImageData(...):
http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-canvas.html#getImageData-method
However, trying to access the method results in an error:
TypeError: Object QQuickCanvasItem(...) has no method 'getImageData'
I believe getImageData is really a method of the Canvas' context.
Example
Canvas { id: canvas width: 300; height: 300 onPaint: { console.log(canvas.getImageData(0, 0, canvas.width, canvas.height)); // TypeError console.log(canvas.getContext('2d').getImageData(0, 0, canvas.width, canvas.height)); // Ok } }