Re: [AD] update bitmap drawing after addition of transformations

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


On 2010-08-13, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> On Fri, 2010-08-13 at 10:57 +1000, Peter Wang wrote:
> > 
> > I have not benchmarked it yet, but I imagine the performance loss will be
> > significant.  If it is, can we not make the memory draw_bitmap_region
> > implementation infer the rotate/scale special cases from the transformation
> > matrix and call the specialised functions?
> > 
> 
> We can check for identity transform and for only scaled transform quite
> easily I think.
> 
> Not sure about rotation.

Should be okay, just check for:

    [cosθ -sinθ]
    [sinθ  cosθ]

    cos²θ + sin²θ = 1

It's a bit silly.  But, on the bright side, we can infer rotations even
if you use a transformation rather than calling al_draw_rotated_bitmap.

Peter




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