go-qml / qml

QML support for the Go language
Other
1.96k stars 189 forks source link

Enable CanvasImageData / putImageData() to QML canvas #103

Open intermernet opened 9 years ago

intermernet commented 9 years ago

I've been trying to work out how to put CanvasImageData to a QML canvas element using the putImageData method, and haven't had much luck. I can use getImageData to save a section of the canvas to a variable, and then put it back, but I can't create the data from scratch.

I came across this group email which seems to suggest that this isn't currently possible, as there is no way to send []byte or []uint8 to QML.

Is this still the current status? I couldn't find any updated method to allow this functionality.

Enabling this functionality will allow many existing HTML5 canvas apps to be easily ported to go-qml as the APIs are almost identical.

Thanks, Mike.

niemeyer commented 9 years ago

Should be easy to get that working for you. I'll get that working after I'm done with #102.