Table of Contents | ||||||||||
|
||||||||||
ClipImage | ||||||||||
Purpose Creates a clipping rectangle to clip blits to the surface |
||||||||||
Protoype void CImageMngr::ClipImage (string str_img_id, int i_rx = 0, int i_ry = 0, int i_rw = -1, int i_rh = -1) |
||||||||||
Parameters
|
||||||||||
Description This function imposes a clipping rectangle upon an image. When the image is blitted onto a surface, only the part of the image within the clipping rectangle will be included in the blit. The rest will not be displayed. You must pass in the ID of the image object you want to assign this clipping rectangle to and then set the rectangle's position and size in pixels. To disable a clip window you should call this function again passing only the image ID. |
||||||||||
Use CImageMngr image; // set the clip window image.ClipImage("my_image", 25, 25, 100, 100); // reset it to the surface size image.ClipImage("my_image"); |
||||||||||
|
||||||||||
|