Re: [AD] get_clip()

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


On 2002-11-03, Eric <ebotcazou@xxxxxxxxxx> wrote:
> > 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() ?

No.

> > 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 ?

The same as when the clipping is turned on.

> > 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 ?

I think they are.  set_clip_ex() deals with the clipping rectangle, and
these two functions deal with turning clipping on and off.

> 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.

Is w=0, h=0 sufficient?

-- 
王浩禎



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