www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/29/05:13:22

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE34923D1@probe-2.acclaim-euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Allegro blitting question
Date: Fri, 29 Jan 1999 10:07:38 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019