buatge / svg-android-2

Automatically exported from code.google.com/p/svg-android-2
Apache License 2.0
0 stars 0 forks source link

Fill colors not inherited by children #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Fill colors in groups are not "inherited" by children.
For example, this should display an England flag, but shows a black cross 
instead of red:

    <?xml version="1.0"?>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 15" width="800" height="480">
        <rect width="25" height="15" fill="#FFF"/>
        <g fill="#CE1124">
            <rect width="3" height="15" x="11"/>
            <rect width="25" height="3" y="6"/>
        </g>
    </svg>

The fill and stroke of groups are now stored in a stack, so we now know if set 
in a group. doFill and doStroke return true if set in a group even if not set 
in the element.
Moreover, I fixed a bug for which SVGHandler.doFill processed missing fill 
attributes as black.

Attached is the modified SVGParser.java.

Original issue reported on code.google.com by neclep...@gmail.com on 25 Oct 2011 at 10:05

GoogleCodeExporter commented 9 years ago
I don't see the modified SVGParser.java, please try to upload it (or the diffs) 
again

Original comment by suh...@google.com on 25 Oct 2011 at 10:35

GoogleCodeExporter commented 9 years ago
subsumed by #5

Original comment by suh...@google.com on 13 Dec 2011 at 1:46