Shifts the position of the document origin. The function does not modify the relative positions of objects in the document; the coordinate locations of objects, however, will change when the origin location is modified.
PROCEDURE SetOrigin(
x : REAL;
y : REAL);def vs.SetOrigin(x, y):
return None| Name | Type | Description |
|---|---|---|
| x | REAL | X-offset from current origin. |
| y | REAL | Y-offset from current origin. |
The difference between this and SetOriginAbsolute is that this call shifts the origin the specified amount, where SetOriginAbsolute sets the origin to the specified values.
Rect(0,0,1,1);
SetOrigin(1,1);
{ Creates a rectangle with the bottom left point at coordinates (0,0), then moves the origin so that the top right point of the rectangle has coordinates (0,0). }IF ((GetObject(concat(SDName, kDash, num2str(0, Scalefactor))) = NIL)&(gettype(GetObject(SDName)) = 16)) THEN BEGIN
GetOrigin(xO, yO);
SetOrigin(-xO, -yO);
numSymDefs := 0;
H := GetObject(SDName);
factor := ScaleFactor;
IF ((H <> NIL) & (gettype(H)=16)) THEN BEGIN
GetOrigin(userOriginX, userOriginY);
SetOrigin(-userOriginX, -userOriginY);
BEGIN
PushAttrs;
GetOrigin(xOrig,yOrig);
SetOrigin(-xOrig,-yOrig);
lowestPoint := kBiggestReal;
higestPoint := -kBiggestReal;
MaxRight := -kBiggestReal;
MinLeft := kBiggestReal;vs.SetOrigin(0, 0)VS Functions: SetOriginAbsolute
Availability: from All Versions