When the scaleToFill boolean is true (default behavior) it will behave like before.
When the scaleToFill boolean is false, it will use the canvas bounds instead of the path bounds, so the transparent pixels outside the path will not be trimmed.
I've also updated the method CubicArc.scale() and CubicLine.scale() to scale the size of the stroke.
This will prevent the path from becoming thinner when upscaling or thicker when downscaling.
I've also updated the example to show the feature, as you can see in the screenshots below.
I hope everything is ok for the merge request, let me know if anything else is needed!
Hello RomanBase,
I updated my brach as you suggested.
When the
scaleToFill
boolean istrue
(default behavior) it will behave like before. When thescaleToFill
boolean isfalse
, it will use the canvas bounds instead of the path bounds, so the transparent pixels outside the path will not be trimmed.I've also updated the method
CubicArc.scale()
andCubicLine.scale()
to scale the size of the stroke. This will prevent the path from becoming thinner when upscaling or thicker when downscaling.I've also updated the example to show the feature, as you can see in the screenshots below.
I hope everything is ok for the merge request, let me know if anything else is needed!