[ 
https://issues.apache.org/jira/browse/BATIK-1191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bjoern Voigt updated BATIK-1191:
--------------------------------
    Description: 
If an SVG image contains objects partially or completely outside the viewbox, 
then these objects are completely or partially hidden, even if the view is 
changed manually with zoom & pan.

This bug is introduced in revision r1784917:

 
{code:java}
$ svn log -c r1784917

------------------------------------------------------------------------
r1784917 | ssteiner | 2017-03-01 12:44:53 +0100 (Wed, 01 Mar 2017) | 1 line

BATIK-1179: Clip wrongly applied
------------------------------------------------------------------------

{code}
The revision r1784917 introduced a global CSS stylesheet:
{code:java}
$ svn diff -c r1784917
Index: 
batik-svg-dom/src/main/resources/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
===================================================================
--- 
batik-svg-dom/src/main/resources/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
    (revision 1784916)
+++ 
batik-svg-dom/src/main/resources/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
    (nonexistent)
@@ -1,6 +0,0 @@
-/*
- * The default SVG style sheet.
- */
-svg, symbol, image, marker, pattern, foreignObject { overflow: hidden }
-
-/* svg { width:attr(width); height:attr(height) } */
Index: 
batik-anim/src/main/resources/org/apache/batik/anim/dom/resources/UserAgentStyleSheet.css
===================================================================
--- 
batik-anim/src/main/resources/org/apache/batik/anim/dom/resources/UserAgentStyleSheet.css
    (nonexistent)
+++ 
batik-anim/src/main/resources/org/apache/batik/anim/dom/resources/UserAgentStyleSheet.css
    (revision 1784917)
@@ -0,0 +1,6 @@
+/*
+ * The default SVG style sheet.
+ */
+svg, symbol, image, marker, pattern, foreignObject { overflow: hidden }
+
+/* svg { width:attr(width); height:attr(height) } */{code}
The bug can be easily shown with the attached sample.svg and Squiggle (part of 
the Batik SVG distribution). It is not a bug of Squiggle. Sample programs with 
JSVGCanvas show the same behavior.

java -jar batik-squiggle-1.8.jar sample.svg
 java -jar batik-squiggle-1.9.jar sample.svg

Initially both Squiggle windows look similar. But if you make the Squiggle 
windows wider, then the version 1.8 variant of Squiggle shows the complete red 
rectangle, which is partially outside the viewbox. The version 1.9 variant 
keeps the red rectangle cut off on the viewbox.

  was:
If an SVG image contains objects partially or completely outside the viewbox, 
then these objects are completely or partially hidden, even if the view is 
changed manually with zoom & pan.

This bug is introduced in version 1.9.

The bug can be easily shown with the attached sample.svg and Squiggle (part of 
the Batik SVG distribution). It is not a bug of Squiggle. Sample programs with 
JSVGCanvas show the same behavior.

java -jar batik-squiggle-1.8.jar sample.svg
java -jar batik-squiggle-1.9.jar sample.svg

Initially both Squiggle windows look similar. But if you make the Squiggle 
windows wider, then the version 1.8 variant of Squiggle shows the complete red 
rectangle, which is partially outside the viewbox. The version 1.9 variant 
keeps the red rectangle cut off on the viewbox.


> Batik changed the overflow default for drawings
> -----------------------------------------------
>
>                 Key: BATIK-1191
>                 URL: https://issues.apache.org/jira/browse/BATIK-1191
>             Project: Batik
>          Issue Type: Bug
>          Components: SVG Viewer
>    Affects Versions: 1.9
>            Reporter: Bjoern Voigt
>            Priority: Major
>         Attachments: initial-view-left18_right19.png, sample.svg, 
> wider-window-view-left18_right19.png
>
>
> If an SVG image contains objects partially or completely outside the viewbox, 
> then these objects are completely or partially hidden, even if the view is 
> changed manually with zoom & pan.
> This bug is introduced in revision r1784917:
>  
> {code:java}
> $ svn log -c r1784917
> ------------------------------------------------------------------------
> r1784917 | ssteiner | 2017-03-01 12:44:53 +0100 (Wed, 01 Mar 2017) | 1 line
> BATIK-1179: Clip wrongly applied
> ------------------------------------------------------------------------
> {code}
> The revision r1784917 introduced a global CSS stylesheet:
> {code:java}
> $ svn diff -c r1784917
> Index: 
> batik-svg-dom/src/main/resources/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
> ===================================================================
> --- 
> batik-svg-dom/src/main/resources/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
>     (revision 1784916)
> +++ 
> batik-svg-dom/src/main/resources/org/apache/batik/dom/svg/resources/UserAgentStyleSheet.css
>     (nonexistent)
> @@ -1,6 +0,0 @@
> -/*
> - * The default SVG style sheet.
> - */
> -svg, symbol, image, marker, pattern, foreignObject { overflow: hidden }
> -
> -/* svg { width:attr(width); height:attr(height) } */
> Index: 
> batik-anim/src/main/resources/org/apache/batik/anim/dom/resources/UserAgentStyleSheet.css
> ===================================================================
> --- 
> batik-anim/src/main/resources/org/apache/batik/anim/dom/resources/UserAgentStyleSheet.css
>     (nonexistent)
> +++ 
> batik-anim/src/main/resources/org/apache/batik/anim/dom/resources/UserAgentStyleSheet.css
>     (revision 1784917)
> @@ -0,0 +1,6 @@
> +/*
> + * The default SVG style sheet.
> + */
> +svg, symbol, image, marker, pattern, foreignObject { overflow: hidden }
> +
> +/* svg { width:attr(width); height:attr(height) } */{code}
> The bug can be easily shown with the attached sample.svg and Squiggle (part 
> of the Batik SVG distribution). It is not a bug of Squiggle. Sample programs 
> with JSVGCanvas show the same behavior.
> java -jar batik-squiggle-1.8.jar sample.svg
>  java -jar batik-squiggle-1.9.jar sample.svg
> Initially both Squiggle windows look similar. But if you make the Squiggle 
> windows wider, then the version 1.8 variant of Squiggle shows the complete 
> red rectangle, which is partially outside the viewbox. The version 1.9 
> variant keeps the red rectangle cut off on the viewbox.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to