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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -