Purpose
Allows an object (not a text object) to be rotated about the rotation anchor point. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Rotate( object, angle )
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.
Return Value
A rotated object.
Description
The Rotate() 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 RotateObject as object
Open Table "C:\MapInfo_data\TUT_USA\USA\STATES.TAB"
map from states
select * from States where state = "IN"
RotateObject = rotate(selection.obj, 45)
insert into states (obj) values (RotateObject)
See Also:
RotateAtPoint() function