Important: The information in this document is obsolete and should not be used for new development.
OffsetPoly
To move a polygon, use theOffsetPoly
procedure.
PROCEDURE OffsetPoly (poly:\xDDPolyHandle; dh,dv:\xDDInteger);
poly
- A handle to a polygon to move.
dh
- The horizontal distance to move the polygon.
dv
- The vertical distance to move the polygon.
DESCRIPTION
TheOffsetPoly
procedure moves the polygon whose handle you pass in thepoly
parameter by adding the value you specify in thedh
parameter to the horizontal coordinates of its points, and by adding the value you specify in thedv
parameter to the vertical coordinates of all points of its region boundary. If the values ofdh
anddv
are positive, the movement is to the right and down; if either is negative, the corresponding movement is in the opposite direction. The region retains its size and shape. This doesn't affect the screen unless you subsequently call a routine to draw the region.
- Note
OffsetPoly
is an especially efficient operation, because the data defining a polygon is stored relative to the first point of the polygon and so isn't actually changed byOffsetPoly
.