Mail Archives: djgpp/1999/01/29/05:13:22
LSC writes:
> If I define char a[100] and my program contain the code a[102]='a', then I
> will write in a out of bound area. How about Allegro? If I blit a 100x100
> bitmap onto a 50x50 bitmap, will I write in a out of bound area?
From allegro.txt:
void blit(...);
Copies a rectangular area of the source bitmap to the destination
bitmap. The source_x and source_y parameters are the top left corner
of the area to copy from the source bitmap, and dest_x and dest_y
are the corresponding position in the destination bitmap. This
routine respects the destination clipping rectangle, and it will
also clip if you try to blit from areas outside the source bitmap.
So no, it won't write past the edge of the bitmap, unless you have
specifically turned off clipping for your destination surface.
Shawn Hargreaves.
- Raw text -