![]() |
|
deprecated replacements |
Neil Walker
Member #210
April 2000
![]() |
Hello, Anyway, back to my main question. The deprecated function I have is set_clip(...), is this now replaced by set_clip_rect(...) and are the parameters the same, e.g. x,y,width,height instead of x1,y1,x2,y2, etc.? Is there anything special with set_clip (thebitmap, 0, 0, 0, 0); As in, what's with the zero values? the manual says use -1 to disable drawing, unless that's something else? Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Matthew Leverton
Supreme Loser
January 1999
![]() |
set_clip was turned into set_clip_state and set_clip_rect. set_clip(bmp, 0,0, 0,0); Is the same as: set_clip_rect(bitmap, 0, 0, bitmap->w-1, bitmap->h-1); set_clip_state(bitmap, FALSE); Clipping is now disabled, and you can draw anywhere (including out of bounds). Quote: As in, what's with the zero values? the manual says use -1 to disable drawing, unless that's something else?
set_clip_rect(bitmap, 0, 0, 0, 0); // you can draw on pixel 0,0 set_clip_rect(bitmap, 0, 0, -1, -1); // you cannot draw anywhere In both of the above cases, clipping is still enabled. |
Neil Walker
Member #210
April 2000
![]() |
I take it set_clip with four zero's was a special case? I think I'd better update my local allegro manual just to make sure Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote: I take it set_clip with four zero's was a special case? Any other numbers are equivalent to: set_clip_rect(bitmap, x1, y1, x2, y2); set_clip_state(bitmap, TRUE); after making sure that x1 <= x2 and y1 <= y2. |
Peter Wang
Member #23
April 2000
|
Replacements for deprecated functions are listed on this page: http://alleg.sourceforge.net/stabledocs/en/api.html
|
|