![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212058.webp)
OMRON
CHAPTER 6 – Functions and Methods
Revision 2.0
Page 45
Rotate
Syntax
objectname.rotate (angle, context, fixed, xcoord, ycoord)
Remarks
Argument Description
objectname
This is the name of the object. Where a script is directly attached to an
object,
objectname
is not required.
angle
The angle of rotation can range between 0 to 360 in a clockwise direction.
Points alone, or as part of an arithmetic expression may be used as an angle.
context
This argument is not required and may be omitted. May be one of:
@TOPLEFT – rotate around top left of object
@TOPCENTRE –rotate around top centre of object
@TOPRIGHT – rotate around top right of object
@CENTRELEFT – rotate around centre left of object
@CENTRE – rotate around centre of object
@CENTRERIGHT – rotate around centre right of object
@BOTTOMLEFT – rotate around bottom left of object
@BOTTEMCENTRE – rotate around bottom centre of object
@ BOTTOMRIGHT – rotate around bottom right of object
@USERDEFINED – user defined point specified in xcoord and ycoord.
fixed
This argument may be omitted. If this boolean value is true, the rotation
origin is fixed to the screen, even if the object is moved. Otherwise, the
rotation origin is relative to object position.
xcoord
ycoord
Only required if @USERDEFINED is specified. These integer variables
specify the rotation origin in pixels
Typical Examples
rotate (45)
The current object to which this example applies is rotated by 45
°
.
RECTANGLE_1.rotate(tilt, @USERDEFINED, 0, -100, 10)
The object ‘RECTANGLE_1’ is rotated by the value of ‘tilt’, about a point –100, 10 relative to the
objects current position.
rotate (a * sin(b))
The current object is rotated based on the result of an arithmetic expression involving points named
‘a and ‘b’.
Summary of Contents for CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Page 2: ...CX Supervisor Script Language Software Revision 2 0...
Page 3: ......
Page 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Page 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Page 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Page 13: ......
Page 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Page 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Page 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Page 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...