[Interest] HTML5 canvas support?

Jason H scorp1us at yahoo.com
Wed Mar 28 20:24:39 CEST 2012

I think we should be able to paint to a HTML5 canvas.

I created the attached PoC, modeled after QPicture. See main.cpp for an example.

The code is released with the following license: 

USE: Use at your own risk. Use it as you wish with no warranties or fitness expressed or implied. 
COPYING/DISTRIBUTION: Don't claim the original code is yours, that would  be wrong. Please attribute the original code to me. (It's a resume thing) It is your responsibility to put my email address in the file headers. You may use the code in Open and Closed Source projects, and assign what ever license and copyright as you wish. I don't assert any copyright, just credit.

The rendering is "pretty good" I've noticed fonts are not pixel-perfect but pretty close. The HTML5 canvas system (at least in FireFox) needs a 0.5px offset to generate a line properly, so things may be a tad off.

If you browser supports HTML I'm attaching sample output. (123.html)

I'd love to see how you use this. Feel free to show me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/zip
Size: 24169 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120328/c19119fc/attachment.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120328/c19119fc/attachment.html>

More information about the Interest mailing list