You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
viewBox defines an internal coordinate system which gets transformed into the parent coordinate system by a combination of width, height, and preserveAspectRatio properties.
JAVSVGParser currently ignores the SVG width and height attributes entirely, which makes the viewBox attribute meaningless when it is not equally sized to width and height. Currently viewBox origin is respected, but its size relative to the SVG width and height is not.
I believe the correct-ish behaviour is, in the SVG handling of JAMSVGParser:
Read width and height
Read preserveAspectRatio
Read viewBox
Image size is determined exclusively by width and height.
Path transformation is determined by combination of all of those attributes.
The text was updated successfully, but these errors were encountered:
While researching the correct fix for #18 , I read through a helpful description of how SVG handles the
viewBox
attribute here: http://tutorials.jenkov.com/svg/svg-viewport-view-box.htmlviewBox
defines an internal coordinate system which gets transformed into the parent coordinate system by a combination ofwidth
,height
, andpreserveAspectRatio
properties.JAVSVGParser
currently ignores the SVGwidth
andheight
attributes entirely, which makes theviewBox
attribute meaningless when it is not equally sized towidth
andheight
. CurrentlyviewBox
origin is respected, but its size relative to the SVGwidth
andheight
is not.I believe the correct-ish behaviour is, in the SVG handling of
JAMSVGParser
:width
andheight
preserveAspectRatio
viewBox
size
is determined exclusively bywidth
andheight
.The text was updated successfully, but these errors were encountered: