Purpose
Allows an object (not a text object) to be rotated about a specified anchor point. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
RotateAtPoint( object, angle, anchor_point_object )
object represents an object that can be rotated. It cannot be a text object.
angle is a float value that represents the angle (in degrees) to rotate the object.
anchor_point_object is an object representing the anchor point which the object nodes are rotated about.
Return Value
A rotated object.
Description
The RotateAtPoint() function rotates all object types except for text objects without altering the source object in any way.
To rotate text objects, use the Alter Object OBJ_GEO_TEXTANGLE statement.
If an arc, ellipse, rectangle, or rounded rectangle is rotated, the resultant object is converted to a polyline/polygon so that the nodes can be rotated.
Example
dim RotateAtPointObject as object
dim obj1 as object
dim obj2 as object
Open Table "C:\MapInfo_data\TUT_USA\USA\STATES.TAB" ]
map from states
select * from States where state = "CA"
obj1 = selection.obj
select * from States where state = "NV"
obj2 = selection.obj
oRotateAtPointObject = RotateAtPoint(obj1 , 65, centroid(obj2))
insert into states (obj) values (RotateAtPointObject )
See Also:
Rotate() function