lucaslorentz / AS3SVGRenderer

An AS3 SVG Renderer for Flash Player.
106 stars 27 forks source link

Missplaced symbols in musical score SVG #38

Closed ciacob closed 10 years ago

ciacob commented 10 years ago

Hey guys, Would you please consider having a look at this SVG?

http://maidens.ciacob.ro/wp/wp-content/uploads/public_misc_temp/score.svg

Open it in Firefox, then open it using your "SVGRendererTest" flex application.

It is a moderately complex musical score exported to SVG, and the filled noteheads appear much to the right and upward than where they should appear — the empty note heads, however, are placed correctly.

I would very much appreciate if you take the time to look into this one.

Thank you a lot, Claudius

P.S.: as a quick reference, here are PNG screenshots.

score-svg-rendered-correctly score-svg-rendered-incorrectly

ciacob commented 10 years ago

Ok, while trying to isolate the issue I managed to nail down the culprit: it has to do with transformations.

All the missplaced symbols are clones of an ellipse element which has a transformation applied. If I remove the transformation from the source of all those clones, they all get correctly positioned.

In the file I sent you the link of, in my previous comment, if I go to line 98, and change:

<ellipse id="hd" rx="4.1" ry="2.9" transform="rotate(-20)" fill="currentColor"/>

to:

<ellipse id="hd" rx="4.1" ry="2.9" fill="currentColor"/>

then all clones get positioned where they should.

If I have time, I'll have a look through the code, and get back to you if I find the source of this missbehavior.

Thank you, and take care, Claudius

lucaslorentz commented 10 years ago

Fixed on latest commit: https://github.com/LucasLorentz/AS3SVGRenderer/commit/48eb32d4b1fa9103875a068b56c9177ea5fa3e24

Thanks for reporting that.