[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Segmentation Fault in PolyPlay 1.3 Walker demo



maybe SDL_gfx has gotten a fix for something like that at some point?
http://www.ferzkopp.net/joomla/content/view/19/14/

isn't aaline source cribbed from SDL_gfx?

On Mon, Apr 7, 2008 at 1:54 PM, Marcus von Appen <mva@xxxxxxxxxxxx> wrote:
> On, Mon Apr 07, 2008, Lenard Lindstrom wrote:
>
>  > Forget that last observation. The traceback doesn't show the arguments
>  > correctly. I have traced the problem to clipaaline. When pts[0] is 0 and
>  > pts[2] is 1 or pts[1] is 0 and pts[3] is 1 it copies pts[2] and pts[3] to
>  > pts[0] and pts[1]. This causes a divided by 0.0 later in drawaaline which
>  > leads to a memory access problem. It doesn't matter if the surface is 24 or
>  > 32 bit.
>
>  [...]
>  That's the same I figured out half an hour ago :-). It's the
>  Cohen-Sutherland clipping line implementation with slight adaptions and
>  works well for normal pixel lines. I'm currently looking into the aaline
>  clipping implementation and try to find a matching fix that takes the AA
>  into account _and_ still provides a more or less reasonable result for
>  those cases.
>
>  Regards
>  Marcus
>