You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by "Marco Herrn (JIRA)" <ji...@apache.org> on 2013/06/04 13:56:19 UTC

[jira] [Updated] (BATIK-1046) preserveAspectRatio="xMinYMin" wrongly translates viewport

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

Marco Herrn updated BATIK-1046:
-------------------------------

    Attachment: ViewBox.svg
                pic4.png
                pic3.png
                pic2.png
                pic1.png
                pic5.png

pic1 shows the file directly after opening.
pic2 shows it after resizing the window to make it larger in both dimensions. You can already see here, that the left edge is cut away.
pic3 shows it after resizing the height to make it taller. The problem here is obvious.
pic4 show it after resizing the window again in both directions to make it smaller. The picture is fully within the canvas, but not on position 0, 0 as expected by xMinYMin (and not even centered).
pic5 show it after doing some arbitrary resizing operations. The picture is now moved out of the bottom of the canvas.

ViewBox.svg is the svg file I used to make these screenshots.
                
> preserveAspectRatio="xMinYMin" wrongly translates viewport
> ----------------------------------------------------------
>
>                 Key: BATIK-1046
>                 URL: https://issues.apache.org/jira/browse/BATIK-1046
>             Project: Batik
>          Issue Type: Bug
>          Components: GVT
>    Affects Versions: 1.7, 1.8
>         Environment: Debian Linux with Java 1.6 or Java 1.7
>            Reporter: Marco Herrn
>         Attachments: pic1.png, pic2.png, pic3.png, pic4.png, pic5.png, ViewBox.svg
>
>
> When setting the "preserveAspectRatio" to "xMinYMin" (and if I recall correctly, also on other values different from "none", the SVG image is correctly placed inside the SvgCanvas on opening. However when resizing the window (and therefore the canvas), the image moves out of the visible canvas part.
> You can reproduce this with the example file http://www.w3.org/TR/SVG/images/coords/ViewBox.svg
> Replace the value of "preserveAspectRatio" with "xMinYMin". Open the file in squiggle. Then resize the window by making it taller (not wider). The image stays in the center vertically, but moves out of the canvas horizontally to the left.
> By playing around a bit with window resizing the image can be moved out of the other edge of the canvas or even completely disappear.
> I have tried it with the current SVN and the problem still applies there.
> I would like to attach some screenshots of the effects, but don't know how to attach files to this bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org