Re: [AD] source clipping

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


On Tue, Jun 29, 2010 at 11:52 PM, Elias Pschernig
<elias.pschernig@xxxxxxxxxx> wrote:
> On Tue, 2010-06-29 at 12:22 -0600, Trent Gamblin wrote:
>> On Tue, June 29, 2010 11:39 am, Matthew Leverton said:
>> > Is al_draw_bitmap_region() supposed to work when the source rectangle
>> > is not completely inside the source bitmap?
>>
>> No, that was never a design goal...
>>
>
> It would make a lot of sense though and should be quite easy to add.
>
I'm working on new clipping code that merges the sub-bitmap clipping
with the base clipping. Basically source clip is set to (0,0)-(src->w,
src->h) at start, then if a sub-bitmap, the origin / clip rectangle is
shifted by xofs, yofs. Then clipping is done.

This is in contrast to the current process which clips first (only
destination), then checks for sub-bitmaps, adjusts coords, and clips
source and destination again if needed.

But a side effect is that source bitmaps are now clipped to
(0,0)-(w,h), which they weren't before. However, in OpenGL, it does
look like source clipping is already taking place.

--
Matthew Leverton




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