Re: [AD] clipping, sub bitmaps

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


On Tue, 2009-08-18 at 16:10 +1000, Peter Wang wrote:
> 
> 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.

They would simply be added. E.g. if you have a centered bitmap (offset
set to the middle), then cx/cy would be relative to that center.

But yes, the origin as well as the offset can both easily be done in
user code by simply changing the parameters passed to drawing functions.

Also, we probably would need getter functions for all the things which
could now change:

al_get_sub_bitmap_coordinates(bitmap, &x, &y, &w, &h)
al_get_bitmap_origin(bitmap, &x, &y, &w, &h)
al_get_bitmap_offset(bitmap, &x, &y, &w, &h)

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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