Intersects the specified rectangle with the visible region of the DC.
This function intersects the specified rectangle prc with the visible region of the device context hdc.
hdc | The device context. | |
prc | Pointer to the rectangle. |
Excludes the specified rectangle from the current visible region of a DC.
This function excludes the specified rect prc from the current visible region of the device context hdc.
hdc | The device context. | |
prc | The rectangle to be excluded. |
Retrieves the bounding rectangle of the current visible region of a DC.
This function retrieves the bounding rectangle of the current visible region of the specified device context hdc, and returned through pRect.
hdc | The device context. | |
pRect | The bounding rectangle will be returned through this buffer. |
Retrieves the bounding rectangle of the current clipping region of a DC.
This function retrieves the bounding rectangle of the current clipping region of the specified device context hdc, and returned through clipbox.
hdc | The device context. | |
clipbox | The bounding rectangle will be returned through this buffer. |
Includes the specified rectangle to the current visible region of a DC.
This function includes the specified rectangle prc to the current visible region of the device context hdc.
hdc | The device context. | |
prc | The rectangle to be included. |
int GUIAPI OffsetClipRegion | ( | HDC | hdc, | |
int | off_x, | |||
int | off_y | |||
) |
Moves the clipping region of a device context by the specified offsets.
This function moves the clipping region of a device context hdc by the specified offsets (off_x, off_y).
hdc | Handle to the device context. | |
off_x | Specifies the number of device units to move left or right. | |
off_y | pecifies the number of device units to move up or down. |
NULLREGION Region is empty. SIMPLEREGION Region is a single rectangle. COMPLEXREGION Region is more than one rectangle. -1 An error occurred.
Checks whether a point is visible.
This function checks whether the point specified by (x,y) is visible, i.e. it is within the current visible clipping region of the device context hdc.
hdc | The device context. | |
x | x,y: The coordinates of the point. | |
y | x,y: The coordinates of the point. |
Checks whether the specified rectangle is visible.
This function checks whether the rectangle pointed to by pRect is visible, i.e. it is intersected with the current visible region of the device context hdc.
hdc | The device context. | |
pRect | Pointer to the rectangle. |
Example:
/* * Use RectVisible to optimize the repaint of the window. */ MSG_PAINT: { HDC hdc = BeginPaint (hWnd); for (j = 0; j < 10; j ++) { if (RectVisible (hdc, rcs + j)) { FillBox (hdc, rcs[j].left, rcs[j].top, rcs [j].right, rcs [j].bottom); } } EndPaint (hWnd, hdc); return 0; }
Sets the visible region of a DC to be a rectangle.
This function sets the visible region of the device context hdc to the rectangle pointed to by prc.
hdc | The device context. | |
prc | Pointer to the rectangle. |
Sets the visible region of a DC to be a region.
This function sets the visible region of the device context hdc to the region pointed to by pRgn.
hdc | The device context. | |
pRgn | Pointer to the region. |
Combines the specified region with the current clipping region using the specified mode.
This function combines the specified region with the current clipping region using the specified mode.
If an error occurs when this function is called, the previous clipping region for the specified device context is not affected.
The SelectClipRegionEx function assumes that the coordinates for the specified region are specified in device units.
Only a copy of the region identified by the pRgn parameter is used. The region itself can be reused after this call or it can be deleted.
hdc | Handle to the device context. | |
pRgn | Pointer to the region to be selected. This handle can only be NULL when the RGN_COPY mode is specified. | |
Specifies | the operation to be performed. It must be one of the following values: |
NULLREGION Region is empty. SIMPLEREGION Region is a single rectangle. COMPLEXREGION Region is more than one rectangle. -1 An error occurred.