I have a few issues with the graphics package which I wanted to discuss:

1. The package name. It’s currently using a generic name, and ultimately, I 
think we’re going to want separate packages for SVG and Canvas. Since it’s 
currently using SVG, I would propose to change the name to 
org.apache.flex.core.svg instead of org.apache.flex.core.graphics (and canvas 
would become org.apache.flex.core.canvas with the same class names in the 
package)

2. There’s no SVG Container which would contain SVG children (and possibly some 
foreignObject elements inside them. I wanted to create one which would be based 
off of ContainerBase. I was going to call it GraphicsContainer, but that class 
already exists and is not a true container. I’d like to rename that class. More 
on that in the next item.

3. I’d like an interface which mimics the Flash APIs as closely as possible. It 
might not make sense to have every element have a “graphics” object because it 
could inflate things unnecessarily, but I’m thinking that it might make sense 
to rename GraphicsContainer to CompoundGraphic which would have all the drawing 
commands as first class methods. That should make converting Flash objects to 
FlexJS objects pretty straight-forward myObj.graphics.drawRoundedRect() would 
become myObj.drawRoundedRect(). I’d like to keep the actual method signatures 
as similar as possible.

4. I also think we should add interfaces for all these classes to make svg and 
canvas (and possibly DOM) easily swappable.

Thoughts?

Reply via email to