Open jcward opened 8 years ago
Yes, this will be an extremely difficult set of issues of solve. Specifically, for transforms or alpha on a group (even a rect with a stroke can be considered a group), it is not possible to apply the transform or alpha to the group without composing multiple Shapes / Sprites in a DisplayList. So that means the render(graphics)
API cannot achieve proper SVG drawing.
But even if you were to compose a displaylist of Shapes / Sprites, and inherit the properties properly, and supported transforms, I recall that scaling up a Shape causes pixelization (as the Shape is rasterized at it's natural, untransformed size.)
I think we could look at tossing the render(graphics)
API and outputting a DisplayObject
instead
As for quality, I think we discussed a solution that might be a suitable compromise between performance and quality, the key is just to get that implemented :wink:
There are fairly significant problems with parent/child element containment and the inheritance of properties, as illustrated by this example:
Here's the rendering in OpenFL vs eog/gimp/etc:![image](https://cloud.githubusercontent.com/assets/2192439/14925255/d0aa9b4a-0e03-11e6-9aa7-a212edff1a06.png)
As you can see:
With the set of circles in a group:
a. again the alpha should be applied to the whole group b. the scaling isn't being applied properly (different x / y scaling) c. the stroke properties should be inherited (issue #32) except where overridden (rectangle)
I haven't looked into the architecture of how SVGs are rendered onto Shapes, but I know in theory how ending fills (or composing Shapes/Sprites) might fix some of these issues.
It may be beyond me, but I'll have a quick look into these issues.