Re: [AD] clipping, sub bitmaps

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


On 2009-08-17, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> If we want to change this, we will need a function
> "_al_find_bitmap_parent(bitmap)" which traverses all the parents to find
> the real one (to be used wherever "bitmap->parent" is used right now).

And apply clipping of the bitmap and all its parents.
Sub-bitmaps should be able to disable clipping entirely.

> - al_set_bitmap_offset(bitmap, x, y)
> 
> This only affects drawing the bitmap itself, and will subtract x, y from
> the position to draw to (prior to rotation/scaling).
> 
> 
> Myself, I think all 5 points make sense.

I can see uses for all of them.  But I think al_set_bitmap_offset()
doesn't need to be included -- a game (should) probably wrap sprites up
into classes to remember other other details, e.g. for animation, so the
offset is not really going to help much.  I think it also makes the cx,
cy parameters of al_draw_*scaled_bitmap more confusing.  Actually, I
don't know what it should do.

Peter




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