#7 g2_filled_arc not working correctly for GD devices

closed-fixed
None
7
2005-02-22
2005-02-19
No

The filled_arc approximation has a bug somewhere in it.
I had a look in cvs, and see you approximate the filled
arc with a filled polygon. However, you add an extra
point in the polygon which breaks the approximation.
For an filled arc between -7 and -37 I also get a
polygon vertex up around 37.

Looking at the code in cvs it seems a typo in the loop
initialisation. The initialisation has:

pts[3] = dtoi(y+r2*sin(a));

but the loop body uses:

pts[5] = dtoi(y-r2*sin(a+i*da));

Shouldn't it be a '-' instead of a '+' in the
initialisation? I haven't tested this, but it seems to
account for the erroneous behaviour in my jpgs.

Thanks for the great library, though.

Discussion

  • Ljubomir Milanovic

    Logged In: YES
    user_id=9224

    The bug can be easily reproduced, I will try to fix it for 0.62.

     
  • Ljubomir Milanovic

    • priority: 5 --> 7
    • assigned_to: nobody --> ljubo
     
  • Ljubomir Milanovic

    • status: open --> closed-fixed
     
  • Ljubomir Milanovic

    Logged In: YES
    user_id=9224

    Bug is fixed and commited to cvs.

     

Log in to post a comment.