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

Percentages of viewport wrong if its width/height is undefined

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: SVG Viewer
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other

      Description

      This SVG does not do what I expect (especially when resizing the window):

      <?xml version="1.0" encoding="iso-8859-1"?>
      <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"
      preserveAspectRatio="xMinYMid meet">
      <rect width="100" height="100"/>
      <rect fill="#c00" x="20%" y="20%" width="60%" height="60%"/>
      </svg>

      The spec is unclear: The width of the initial viewport is established by
      the width of the outermost svg element, but the default value of this width
      attribute is 100% (of the viewport width).

        Attachments

        1. viewport.svg
          0.2 kB
          x00000000

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              x00000000@freenet.de x00000000
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: