views:

121

answers:

1

Hello,

I've been successfully using dojox.gfx with SVG renderer to render my graphics in a browser-independent way.

I know that on of the main reasons why SVG-style filters have not been implemented in dojox.gfx is because they are not part of the Canvas and VML specification.

What I am trying to achieve is apply some effects to my dojox.gfx shapes like shadowing, blurring, texture pattern, etc. What's the best way to achieve this?

I realize that libraries like Raphael, Cappuccino, and jQuery do support SVG filters, but I really do want to use dojox.gfx abstraction of a common graphics API.

I think it would make sense if dojox.gfx included a basic filter library for such common effects (like the above-mentioned ones) and have them implemented for Canvas and VML even if they are not part of the specification.

Regards,

Georgi

A: 

Unfortunately it is not possible to implement anything for VML without resorting to a downloadable plugin. Canvas is doable, yet it will be the uphill battle to implement some effects in JavaScript due to their computational complexity and JavaScript's inherent inefficiency while working with pixels and other low-level types.

But I feel your pain, and it looks like the next big thing for dojox.gfx will be better support for SVG and Canvas including clipping, filters, and animation. Stay tuned!

Eugene Lazutkin