[metapost] Missing stroke-linejoin attribute in SVG output for filldraw command

Joshua Krämer joshua at kraemer.link
Thu Sep 5 11:54:41 CEST 2024


Hi all,

the following sample file defines two rectangles with a draw and 
filldraw command, respectively. In the generated SVG file, the first 
rectangle with the draw command contains a path element with the 
attribute "stroke-linejoin: round;" and thus appears as intended, with 
rounded corners. This attribute is missing for the second rectangle with 
the filldraw command, which thus appears with sharp corners. I think 
this is a bug, because drawing or filldrawing with pencircle should 
always result in rounded corners. Adding "linejoin := rounded;" doesn't 
make a difference.

outputformat := "svg";
beginfig(1);
	pickup pencircle scaled 12;
	draw unitsquare scaled 48;
	filldraw unitsquare scaled 48 shifted (72, 0);
endfig;
end;

Kind regards,
Joshua Krämer


More information about the metapost mailing list.