Re: [AD] some small patches |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, 2002-11-02 at 14:13, Eric Botcazou wrote:
> > 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().
>
Yes - the empty rectangle approach is what my patch should do. And it is
the current behavior already when clipping at top/left edges. Either
top/left or right/bottom should probably be changed - and I vote for
right/bottom as I just said in my other post.
Maybe if a set_clip_ex is made to work around the (0,0,0,0) feature, it
should use w and h parameters instead of inclusive coordinates.
--
Elias Pschernig