display.newPolygon.x/y scale affects strokeWidth

Hi there, I’m following the documentation.

I have a normalized set of vertices (all values between 0 and 1) that I input into display.newPolygon.

I then modify the polygon.xScale, polygon.yScale to the values that I want such as width/height of a frame.

Modifying the x/yScale also affects the strokeWidth, but I do not want this, because I can’t input strokeWidth less than 1 (or the stroke will be invisible), so I end up with scaled up polygons that are just garbled by scaled up strokes.

I guess I have to go back to scaling the vertices manually before inputting them into the display.newPolygon function?

Hi @danielr0.

Yes, scaling a stroked object will scale both aspects, as if it’s one entire rendered object before scaling (which it is). You should scale your vertices first in this case of wanting an exact stroke width of 1 regardless of the object scale amount.

Best regards,

Brent

Hi @danielr0.

Yes, scaling a stroked object will scale both aspects, as if it’s one entire rendered object before scaling (which it is). You should scale your vertices first in this case of wanting an exact stroke width of 1 regardless of the object scale amount.

Best regards,

Brent