HTML5 Canvas Wrapper

Monkey Forums/Monkey Code/HTML5 Canvas Wrapper

impixi(Posted 2011) [#1]
PURPOSE: Provide extended HTML5 canvas functionality, including canvas text, 'stroke', lines, shadows, pixel manipulation, textured polygons etc.

To use, save the following files into a project folder:

canvasmods.js




canvaswrapper.monkey



mojostate.monkey




impixi(Posted 2011) [#2]
Text examples:

text.monkey



textwithmojo.monkey




impixi(Posted 2011) [#3]
ImageData example:

imagedata.monkey




impixi(Posted 2011) [#4]
Textured Polygon example:

texpoly.monkey




impixi(Posted 2011) [#5]
More examples? Let me know what you'd like...


DruggedBunny(Posted 2011) [#6]
Just tried this -- good stuff, especially the poly and imageData access. Thanks!


impixi(Posted 2011) [#7]
22-NOV-2011

Fixed a little bug in canvasmods.js


Richard Betson(Posted 2011) [#8]
More examples?


How do I do a fill gradient on a poly?

Great Work.


impixi(Posted 2011) [#9]
Linear and Radial Gradients Example

gradients.monkey




Richard Betson(Posted 2011) [#10]
^Awesome, works great. Thanks. Off to do a demo. :p


Armitage1982(Posted 2011) [#11]
Waw, I didn't know you could do that, this is clever !