[Interest] HTML5 canvas support?

2 views
Skip to first unread message

Jason H

unread,
Mar 28, 2012, 2:24:39 PM3/28/12
to Interests Qt

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.

Details:
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.

test.zip
123.html

Jason H

unread,
Mar 29, 2012, 3:50:52 PM3/29/12
to Jason H, Interests Qt
No one else thought this was cool?


From: Jason H <scor...@yahoo.com>
To: Interests Qt <inte...@qt-project.org>
Sent: Wednesday, March 28, 2012 2:24 PM
Subject: [Interest] HTML5 canvas support?
_______________________________________________
Interest mailing list
Inte...@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Reply all
Reply to author
Forward
0 new messages