SET_CLIP_RECT(3ALLEG4) - Linux man page online | Library functions
Sets the clipping rectangle of a bitmap. Allegro game programming library.
set_clip_rect(3alleg4) Allegro manual set_clip_rect(3alleg4)
Allegro version 4.4.2 set_clip_rect(3alleg4)
NAMEset_clip_rect - Sets the clipping rectangle of a bitmap. Allegro game programming library.
SYNOPSIS#include <allegro.h> void set_clip_rect(BITMAP *bitmap, int x1, int y1, int x2, int y2);
DESCRIPTIONEach bitmap has an associated clipping rectangle, which is the area of the image that it is OK to draw onto. Nothing will be drawn to positions outside this space. This function sets the clipping rectangle for the specified bitmap. Pass the coordinates of the top-left and bottom-right corners of the clipping rectangle in this order; these are both inclu‐ sive, i.e. set_clip_rect(bitmap, 16, 16, 32, 32) will allow drawing to (16, 16) and (32, 32), but not to (15, 15) and (33, 33). Drawing operations will be performed (at least partially) on the bitmap as long as the first coordinates of its clipping rectangle are not greater than the second coordinates and its intersection with the actual image is non-empty. If either condition is not ful‐ filled, drawing will be turned off for the bitmap, e.g. set_clip_rect(bmp, 0, 0, -1, -1); /* disable drawing on bmp */ Note that passing "out-of-bitmap" coordinates is allowed, but they are likely to be altered (and so the coordinates returned by get_clip_rect() will be different). However, such modifications are guaranteed to preserve the external effect of the clipping rectan‐ gle, that is not to modify the actual area of the image that it is OK to draw onto.
SEE ALSOget_clip_rect(3alleg4), add_clip_rect(3alleg4), set_clip_state(3alleg4), get_clip_state(3alleg4), ex12bit(3alleg4), excamera(3alleg4)
|This manual||Reference||Other manuals|
|set_clip_rect(3alleg4)||referred by||add_clip_rect(3alleg4) | BITMAP(3alleg4) | ex12bit(3alleg4) | excamera(3alleg4) | get_clip_rect(3alleg4) | get_clip_state(3alleg4) | is_inside_bitmap(3alleg4) | set_clip_state(3alleg4)|
|refer to||add_clip_rect(3alleg4) | ex12bit(3alleg4) | excamera(3alleg4) | get_clip_rect(3alleg4) | get_clip_state(3alleg4) | set_clip_state(3alleg4)|