Re: Re: [AD] About create_bitmap

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


On Wed, 2004-11-10 at 08:27 -0600, allegrovp@xxxxxxxxxx wrote:
> Yes, that is a fair criticism.
> However, I was using this as an example
> of why allowing boundary conditions to
> work might have a real life case where
> it is useful.
> 

Yes, in your example, you save some checks in user code to only access a
widget's bitmap in case it is not empty (and therefore can have a bitmap
attached to it at all).

But, you can just as well construct examples where you need an extra
check in case bitmaps *may* be empty. E.g. if you always use the color
of the first pixel as transparency index, you can just use bmp->line[0]
currently. Changing create_bitmap to allow empty bitmaps would break
that.

So, I think we can't easily change it. For the new API, it could be
worth considering though. And at the same time, we could clarify the
semantics of sub-bitmaps which was brought up some times.. if A is a
sub-bitmap of B which is a sub-bitmap of C - is A also a sub-bitmap of
C? Also, resizing and moving would make of sense with sub-bitmaps..

-- 
Elias Pschernig





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