Re: [AD] clipping, sub bitmaps

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


On 2009-08-16, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> On Sun, Aug 16, 2009 at 10:16 AM, Elias
> Pschernig<elias.pschernig@xxxxxxxxxx> wrote:
> > I think we can add this, it shouldn't make the code more complicated.
> >
> > About the moving the origin, I assume you mean something like:
> >
> > al_change_sub_bitmap_dimensions(bitmap, x, y, w, h)
> >
> I'm actually speaking of two different approaches to accomplish the
> same basic thing. I don't know at all how the bitmaps and graphic
> system works, so their implementations may be related (or not).
> 
> The first thing is just support for sub-bitmaps whose origin is
> located off of the parent bitmap.

If you needed another opinion, I agree it shouldn't complicate things
much.  It seems like a natural extension of the sort of convenience that
sub-bitmaps are supposed to provide.

> > Also, since we are changing things like this, myself I often want
> > something like:
> >
> > al_set_bitmap_offset(bitmap, x, y)
> >
> This is more like what I mean about moving the origin. If you combine
> that with clipping, then you have (imo) more natural sub bitmaps.

With sub-bitmaps it would be easy to allow you to change the
sub-bitmap's offset and size.  On the other hand, if you create a
sub-sub-bitmap then change the parent bitmap's offset, you might expect
the sub-sub-bitmap to be shifted as well, and that *would* complicate
things.  The same argument applies to top-level bitmaps and sub-bitmaps.

Peter




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