Strange scaling issue with SVG file loaded with geomerative RG
in
Contributed Library Questions
•
2 years ago
Hello,
I am loading an SVG file within a RG object.
The sketch window is sized according to the SVG dimensions (dimensions are divided by 2 because the picture is big).
s = RG.loadShape("BelgiumC.svg");
size(int(s.width/2), int(s.height/2), JAVA2D);
However, if I want the whole picture to be shown within the window, I must reduce it further (factor 0.9) :
polyshp = RG.polygonize(s);
RG.shape(polyshp, 0, 0, 0.9 * width, 0.9 * height);
Does it come from the SVG file ? How can I modify it to solve the problem (the SVG file was created with Inkscape) ?
Thank you in advance.
I am loading an SVG file within a RG object.
The sketch window is sized according to the SVG dimensions (dimensions are divided by 2 because the picture is big).
s = RG.loadShape("BelgiumC.svg");
size(int(s.width/2), int(s.height/2), JAVA2D);
However, if I want the whole picture to be shown within the window, I must reduce it further (factor 0.9) :
polyshp = RG.polygonize(s);
RG.shape(polyshp, 0, 0, 0.9 * width, 0.9 * height);
Does it come from the SVG file ? How can I modify it to solve the problem (the SVG file was created with Inkscape) ?
Thank you in advance.
1