Scaling Polyline w/o scaling thickness
-
Hello I'm scaling some
Polyline
s, and for some I want the thickness of the line to follow the scale, works fine by default, but for some I want to keep a fixed pixel width regardless of scale. Is that possible in some simple way or do I have to calculate theStrokeThickness
myself? thanks in advance Niklas -
Hello I'm scaling some
Polyline
s, and for some I want the thickness of the line to follow the scale, works fine by default, but for some I want to keep a fixed pixel width regardless of scale. Is that possible in some simple way or do I have to calculate theStrokeThickness
myself? thanks in advance NiklasNiklas Lindquist wrote:
I'm scaling some Polylines
How are you currently doing this?
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Niklas Lindquist wrote:
I'm scaling some Polylines
How are you currently doing this?
Mark Salsbery Microsoft MVP - Visual C++ :java:
Oh, sorry, I'm setting a
TransformGroup
containing aScaleTransform
and aTranslateTransform
, on thePolyline
sRenderTransform
property. I managed to recalculate the width, but it adds a lot of overhead in adding a number of event handlers. So I'm still interested in a simpler way to do this. /Niklas -
Oh, sorry, I'm setting a
TransformGroup
containing aScaleTransform
and aTranslateTransform
, on thePolyline
sRenderTransform
property. I managed to recalculate the width, but it adds a lot of overhead in adding a number of event handlers. So I'm still interested in a simpler way to do this. /NiklasNiklas Lindquist wrote:
I'm still interested in a simpler way to do this
I don't know of a simpler way. My guess is that you'd need to scale/translate the polyline points separately and create a new PolyLine from those points if you want to prevent the strokethickness from getting transformed.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Niklas Lindquist wrote:
I'm still interested in a simpler way to do this
I don't know of a simpler way. My guess is that you'd need to scale/translate the polyline points separately and create a new PolyLine from those points if you want to prevent the strokethickness from getting transformed.
Mark Salsbery Microsoft MVP - Visual C++ :java: