Re: [AD] get_clip()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> I think it's really time we depreciated set_clip() and its weird
> semantics.  Here is a proposal.
>
> void set_clip_ex(BITMAP *bitmap, int x, int y, int w, int h);
>     Set the clipping rectangle of a bitmap.
>     Nothing special wrt to 0, 0, 0, 0.

Does it imply enable_clipping() ?

> void get_clip(BITMAP *bitmap, int *rx, int *ry, int *rw, int *rh);
>     Get the clipping rectangle of a bitmap.

What does it return when clipping is turned off ?

> void enable_clipping(BITMAP *bitmap);
> void disable_clipping(BITMAP *bitmap);
>     Doesn't modify the clipping rectangle.

They are not really orthogonal to set_clip_ex(), are they ?


Moreover, I think we shoud devise a way to specify an "empty" clipping 
rectangle (for which cl = cr and ct = cb) so that all drawing operations are 
silenced, provided that it doesn't require an extensive rework of all the 
drawing routines of the library.

-- 
Eric Botcazou



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/