Re: [AD] Line clipping fix

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


> I have gotten line drawing to clip properly while
> keeping track of the bresenham state.  It should be
> faster than 4.1.11 for clipped lines and should be
> almost as fast as the pixel incorrect version in
> 4.1.12.  I dont know if there are standardized speed
> or regression tests that need to be run.

Thanks for your efforts.

> I've also made a test program to show the problems
> with 4.1.12.

There is indeed a problem, that I totally overlooked when I accepted the 
Cohen-Sutherland patch.  The results of the drawing operations must be 
identical if you clip before or after drawing.

> I dont know anything about gettign this code into
> allegro.  I assume that someone can (test and) apply
> this patch?

I've been thinking about this problem for more than a week.  My viewpoint is 
currently the following:
- the original code (4.1.11) is correct, simple and slow,
- the new code (4.1.12) is incorrect, simple and fast,
- your code is correct, complicated and a bit faster than the original code.

So I'm leaning towards simply reverting to the 4.1.11 implementation.

-- 
Eric Botcazou




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