Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-1046

preserveAspectRatio="xMinYMin" wrongly translates viewport

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7, 1.8
    • Fix Version/s: None
    • Component/s: GVT
    • Labels:
      None
    • Environment:
      Debian Linux with Java 1.6 or Java 1.7

      Description

      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.

        Attachments

        1. pic5.png
          13 kB
          Marco Herrn
        2. pic1.png
          16 kB
          Marco Herrn
        3. pic2.png
          22 kB
          Marco Herrn
        4. pic3.png
          23 kB
          Marco Herrn
        5. pic4.png
          18 kB
          Marco Herrn
        6. ViewBox.svg
          1 kB
          Marco Herrn

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hupfdule Marco Herrn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: