Skip to content

Commit 4fe8e74

Browse files
committed
adjusting SVG canvas size with proper width/height
1 parent 540d299 commit 4fe8e74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/libraries/svg/src/processing/svg/PGraphicsSVG.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void beginDraw() {
8585

8686
// Create an instance of the SVG Generator.
8787
g2 = new SVGGraphics2D(document);
88-
((SVGGraphics2D) g2).setSVGCanvasSize(new Dimension(width, height));
88+
((SVGGraphics2D) g2).setSVGCanvasSize(new Dimension(width * pixelDensity, height * pixelDensity));
8989

9090
//set the extension handler to allow linear and radial gradients to be exported as svg
9191
GradientExtensionHandler gradH = new GradientExtensionHandler();

0 commit comments

Comments
 (0)