Find WP7 Polygon Coordinates

After rotation and translation using CompositeTransform. The coordinates for the figures remain the same in both message blocks.

Messagebox.Show(Convert.ToString(T1Shape.Points[i].X)) ;

initialAngle = transform.Rotation;
initialScale = transform.ScaleX; 
transform.TranslateY = -150;
transform.TranslateX = 200;

Messagebox.Show(Convert.ToString(T1Shape.Points[i].X)) ;

How to find out the coordinates of a polygon on canvas or after conversion?

Thank you for your help.

+3
source share
3 answers
+1
source

You will need to apply the transforms yourself to find out the coordinates after the transform.

0
source

UIElement 0,0 ( , ). . :

var gtransform = myPolygon.TransformToVisual(Application.Current.RootVisual as UIElement);
Point position = gtransform.Transform(new Point(0, 0));

position.X position.Y X Y .

0
source

All Articles