Loading ...
Sorry, an error occurred while loading the content.

Unintended scaling down of linked svg

Expand Messages
  • honyk
    Hello Everyone, I am probably missing something, but when I place another svg into my svg, it is scaled down a bit (attached). Both these images have the same
    Message 1 of 6 , Jun 4, 2011
    • 0 Attachment
      Hello Everyone,

      I am probably missing something, but when I place another svg into my svg,
      it is scaled down a bit (attached).

      Both these images have the same 'resolution' so if there is any size
      specified, it should be equal. It will be processed in Batik so I tested it
      there (Squiggle), but the same behaviour I've noticed also in Firefox.

      Can I avoid it somehow or is it a bug in both tested environments?

      Regards,
      Jan


      [Non-text portions of this message have been removed]
    • jonfrostsvg
      Hi Jan, of the SVG mapping world if I recall correctly. As you may have notice, attachments are not allowed in this group - for security reasons most-likely.
      Message 2 of 6 , Jun 4, 2011
      • 0 Attachment
        Hi Jan, of the SVG mapping world if I recall correctly.

        As you may have notice, attachments are not allowed in this group - for security reasons most-likely. Please post the file on a website if possible and link to it, or send it over to me and I can post it for review, or just send you an answer.

        Best,
        Jon
      • honyk
        ... I ve thought I already sent attachment successfuly here. I ll keep this in mind. So here is the link: http://hroska.cz/other/test_link.svg That red
        Message 3 of 6 , Jun 4, 2011
        • 0 Attachment
          > attachments are not allowed in this group

          I've thought I already sent attachment successfuly here. I'll keep this in
          mind.
          So here is the link: http://hroska.cz/other/test_link.svg
          That red rectangle should fill all the area. But it is smaller. I don't know
          why.

          Jan
        • jonfrostsvg
          I believe uploading of files is still allowed, under the Files menu item. In any case, I think the problem you are running into is that there are two
          Message 4 of 6 , Jun 4, 2011
          • 0 Attachment
            I believe uploading of files is still allowed, under the "Files" menu item. In any case, I think the problem you are running into is that there are two viewboxes being applied.

            So per your code sample, try removing the viewbox from the root SVG element of the externally referenced link.svg file and then you should see what you expected.

            If not, just let me know. Best,
            Jon
          • honyk
            ... Thanks for the tip, but it doesn t help (the same result). Btw, this viewBox is a must in other my files (that I want to use this way) as it stores info
            Message 5 of 6 , Jun 4, 2011
            • 0 Attachment
              > I think the problem you are running into is that there are
              > two viewboxes being applied.

              > So per your code sample, try removing the viewbox from the root
              > SVG element of the externally referenced link.svg file and then
              > you should see what you expected.

              Thanks for the tip, but it doesn't help (the same result). Btw, this viewBox
              is a must in other my files (that I want to use this way) as it stores info
              how used coordinations are related to the physical size.

              I can scale that reference SVG file by some constant value (<g
              transform="scale(1.06, 1.06)"> seems to be sufficient), but it is quite
              dirty solution...
            • jonfrostsvg
              I ran a few tests and for FFox and Opera, if you specify the width and height on the element, the scaling and display seems to match your needs without
              Message 6 of 6 , Jun 6, 2011
              • 0 Attachment
                I ran a few tests and for FFox and Opera, if you specify the width and height on the <use> element, the scaling and display seems to match your needs without having to transform/scale the content. Will that work for you?

                Removing the viewbox from the root of test_list.svg fixes the sizing of the <use> as well, but this is less likely to solve your puzzle.
              Your message has been successfully submitted and would be delivered to recipients shortly.