What are the strengths and weaknesses of various GWT canvas libraries?
I'm currently practicing my web dev开发者_开发问答elopment skills, and thought it would be fun to make a Paint type program. I'd like to use something like the HTML5 element, but want it to be usable in IE(I don't expect IE 6 to be compatible with it, but IE 7+ would be nice.)
So far I know about the vaadin graphics library, but I haven't been happy with it. I also looked at google's offering but it has since been deprecated and it is not recommended that it be used.
So, what else is out there, and what are it's strength/weaknesses? I'm not wedded to GWT so any suggestions using another route is also welcome.
Oookay ... this will be a bit to write ...
About one year ago, there was the incubator project which had Canvas support. Moreover, they didn't just support the html5 canvas tag, but also they had an vml-emulation for IE6 and higher.
The incubator project was then discontinued and they moved lots of stuff into the main line including the Canvas.
Unfortunately, the emulation was not good enough (html5 canvas procedural, vml is declarative) so the emulation couldn't do 100% exactly the same as the native html5 canvas. They killed the emulation.
Then, there are projects which use ex-canvas. It's a javascript emulation library which is used by e.g. gflot. I havn't tested it yet, but it was the common way to enable the IE to use canvas-tags.
Thirdly, what I use now is gwt-graphics. It's a good library which DOES NOT use html5 canvas but instead embedded svg on browser which support this. On other browsers e.g. IE vml is used. Both is declarative why it's more compatible.
So, you have to decide which way to go :)
All the best, Thomas
raphael4gwt may be what you want (http://g.raphaeljs.com/). Also let you draw any vector based graphic you need very easily. It is based on SVG and on VML on IE<9.0 so you should not have browser troubles. An example Paint like program.
精彩评论