[AD] set_clip and set_clip_rect |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I can't seem to find any messages in my inbox explaining this, so
perhaps someone here can enlighten me.
What was the purpose of creating set_clip_rect and deprecating set_clip?
Though both take exactly the same arguments, and as far as I can see,
do exactly the same thing (set the main clip rectangle). Perhaps there's
some deep reason I can't see, but having to do something like this to
get rid of a warning is annoying:
#if ((ALLEGRO_VERSION*10000 + ALLEGRO_SUB_VERSION*100 +
ALLEGRO_WIP_VERSION) >= (4*10000 + 1*100 + 14))
set_clip_rect(stream->bitmap, 0, 0, stream->w-1, stream->h-1);
#else
set_clip(stream->bitmap, 0, 0, stream->w-1, stream->h-1);
#endif
As you can see, both commands are exactly the same, except one needs a
_rect suffix. It was also a bit annoying to have to figure out that #if
statement to check for a proper Allegro version number..
- Kitty Cat