Page 1 of 1

rotate node

PostPosted: April 14th, 2013, 10:28 am
by glabz74
Good day all

Could somebody give a hint ? How do rotate canvas node (triangle or Rectangular, for example )?

Re: rotate node

PostPosted: April 15th, 2013, 4:11 pm
by Kambiz
Most of node classes are derived from TPolygonalNode class. This objects holds the vertices of the shape. Theoretically you can rotate the vertex points array of a TPolygonalNode object.

You can use RotatePoints global procedure to rotate an array of points around and arbitrary origin.