You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to draw some graphics that are designed for a unit 1x1 and then scaled to the appropriate size at runtime. The challenge I have is the pen needs to be a hairline pen (one pixel wide no matter the scaling). Right now, the pen will scale with the scaling of the graphic, and I don't see a way to specify 'no-scaling' for the pen.
One way I've found is to specify a strokeWidth that is a fraction of the intended size, so it almost looks right, but that's not ideal as the x and y scaling will be applied differently, and I don't know at design time what scale something is going to have.
Is there a way to more accurately controle the stroke in this way?
The text was updated successfully, but these errors were encountered:
I believe it does exactly what you would expect, it changes the order of transformation so the input is transformed before the stroke path is calculated.
Just tried this. Works like a charm! Now that I know this, I'll explore some of the other transformation stuff. In particular the ones on images, paths, and patterns.
I have been trying to draw some graphics that are designed for a unit 1x1 and then scaled to the appropriate size at runtime. The challenge I have is the pen needs to be a hairline pen (one pixel wide no matter the scaling). Right now, the pen will scale with the scaling of the graphic, and I don't see a way to specify 'no-scaling' for the pen.
One way I've found is to specify a strokeWidth that is a fraction of the intended size, so it almost looks right, but that's not ideal as the x and y scaling will be applied differently, and I don't know at design time what scale something is going to have.
Is there a way to more accurately controle the stroke in this way?
The text was updated successfully, but these errors were encountered: