BOOL OffsetViewportOrgEx(hdc, nX, nY, lpPoint) | |||||
HDC hdc; | /* handle of device context | */ | |||
int nX; | /* device units to add to x-coordinate | */ | |||
int nY; | /* device units to add to y-coordinate | */ | |||
POINT FAR* lpPoint; | /* address of POINT structure | */ |
The OffsetViewportOrgEx function modifies the viewport origin relative to the current values. The formulas are written as follows:
xNewVO = xOldVO + X
yNewVO = yOldVO + Y
The new origin is the sum of the current origin and the nX and nY values.
hdc
Identifies the device context.
nX
Specifies the number of device units to add to the current origin's x-coordinate.
nY
Specifies the number of device units to add to the current origin's y-coordinate.
lpPoint
Points to a POINT structure. The previous viewport origin (in device coordinates) is placed in this structure. If lpPoint is NULL, the previous viewport origin in not returned.
The return value is nonzero if the function is successful. Otherwise, it is zero.