CPoint:Offset
The Offset method adds a numeric offset to the x and y members of the CPoint. For example, consider applying an offset of (4,6). Then x=1.3 becomes x=5.3, and x=-16.2 becomes x=-10.2.
P = CPoint:Offset( dx ) P = CPoint:Offset( dx, dy ) P = CPoint:Offset( CPoint_old ) P = CPoint:Offset( CRect_old ) P = CPoint:Offset( tblOffset )
|
The following script creates a CPoint object and applies an Offset to its values.
|
-- create a CPoint object |
|
-- result: x=4.4, y=-12.7 |
|
-- offset the values |
|
-- result: x=0.4, y=-6.7 |
|
-- create a rectable offset in the method call |
|
-- result: x=1.4, y=-3.7 (apply width and height) |
CPoint class, CRect class, CPoint Math Operators
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.