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’.
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...