Jump to content

SVG import "viewBox" attribute unexpected interaction with "width" and "height"


Recommended Posts

I am generating SVG files with very large viewBox min-x coordinates

eg <svg xmlns="http://www.w3.org/2000/svg" viewBox="36900 -60 7800 1590" width="7800" height="1590">

 

If I import such an SVG into Affinity Designer (1.9.3) the combination of the viewBox and width/height attributes causes the artwork to lie outside the 7800x1590 pixel document with large negative Y coordinates.

 

If I remove the "width" and "height" attributes (which specify the same size as those specified by the "viewBox" attribute) the file is imported in the way I expect.

 

Note that I don't know what the "correct" behaviour is -- just trying to reading the SVG specifications causes anger and confusion! -- but both Firefox and Safari web browsers don't seem to be upset by this combination of attributes, and it would be nice if Designer did the same thing.

 

svg-transform-test-case-3.svg svg-transform-test-case-4.svg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.