c# - Get updated polygon points after transformation -
c# - Get updated polygon points after transformation -
i need retrieve new points coordinates of polygon(inside canvas) after rotatetransform.
rotatetransform rotation = new rotatetransform(rotationangle); polygon.rendertransform = rotation;
as rendertransform applied, polygon.points
collection doesn't new values.
i've read people trying bind pointcollection
(that not observablecollection
), didn't find useful.
you may transformed points sequentially applying transform points in polygon's points
collection:
using system.linq; var transformedpoints = polygon.points.select(p => rotation.transform(p));
c# wpf transform polygon shapes
Comments
Post a Comment