Re: [AD] some small patches

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


> I'm more wondering about clipping rectangles completely outside of the
> bitmap.. i can think of a lot of code where this would save some if
> lines. Probably it would require a "disabled" flag in bitmaps - which
> might be useful for other things as well .

IMHO that doesn't make sense: clipping rectangles are areas it is always safe 
to draw onto, so they must lie within the limits set by the underlying 
allocated memory. Hence the semantics of set_clip() which does the 
intersection between the specified rectangle and the actual dimensions of the 
bitmap.

Better would be to allow specifying an "empty" clipping rectangle, as 
suggested by Vincent. Simply setting cl and cr to the same value could be 
sufficient or require very little work internally. The interface would be 
more problematic though, because of the inclusive/inclusive semantics of 
set_clip().

-- 
Eric Botcazou



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