Re: [AD] clipping line algorithm

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


> Do you mean we should replace the current implementation of
> is_linear_bitmap() by
>
>     return (bmp->vtable->putpixel == _linear_putpixel8) ||
>            (bmp->vtable->putpixel == _linear_putpixel15) ||
>            (bmp->vtable->putpixel == _linear_putpixel16) ||
>            (bmp->vtable->putpixel == _linear_putpixel24) ||
>            (bmp->vtable->putpixel == _linear_putpixel32);
>
> ?

Well, no. Those who put the 'linear' flag (or rather who don't put the 
'planar' flag, this is admittedly not very well designed) on their bitmaps 
are supposed to know what this implies, i.e essentially that the user can 
call _putpixel() and bmp_write() on them.

But, in my opinion, setting this linear flag doesn't preclude them from 
wiring a custom vtable, which should be guaranteed not to be bypassed by the 
first drawing primitive they call.

-- 
Eric Botcazou




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