Drawing outline of an element affected by completely unrelated SVG elements
Dennis Hendriks <[email protected]>
| Newsgroups | gmane.text.xml.batik.user |
|---|---|
| Organization | TU/e |
| Message-ID | <[email protected]> |
Hi all, while trying to draw the outline of an SVG element over the actual SVG image, I ran into some trouble. The outline is sometimes drawn with a thick border, if completely unrelated SVG elements are add to the SVG document. To demonstrate this, I created a very simple example (see attachment). It contains: - my Eclipse project with the small test example, most notably: - /src/BatikTestFrame.java (run this in the /test/ dir to test it) - /test/test1.svg (first example SVG file, without the added elements) - /test/test2.svg (second example SVG file, with the added elements) - /test/tests.svg.diff (output from: diff -u test1.svg test2.svg) - /test/batik_test.launch (Eclipse launch file that I used to test it) - /test/test_output.png (the window that the example displays) What happens is that I draw both test1.svg (left) and test2.svg (right) two times (vertically). On them, I draw the outline of the SVG element with id "building". The top one is drawn normally, while the bottom one is drawn with a BasicStroke of width 1.0 (see the line in the .java source file marked with "//HACK"). As you can see in test_output.svg, the one with added SVG elements (test2.svg, on the right), where the stroke is not modified (on the top), has a thick border. Also note that the modifications in test2.svg (relative to test1.svg, see tests.svg.diff) should not affect the "building" SVG element's outline... The stroke hack acts as a temporary workaround for this issue. I use the batik version included in Eclipse Modeling Helios SR2, which is Batik 1.6.0, judging from the /src/META-INF/MANIFEST.MF (see attachment) file. So, finally, my question: Is this expected behavior, and if so, what causes the thick border? Or is it perhaps a bug? Best regards, Dennis --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
batik.test.zip
(application/zip, 8.7 KB) - not displayed