[fpc-pascal] Agg Pas Arcs

James Richters james at productionautomation.net
Wed Aug 30 22:38:53 CEST 2017


>Please get a fpGUI repository update so you have the latest AggPas from there. I found a bug in Agg_2D's Arc() implementation, 
>and it didn't match the documentation's sample output. Yet the Agg2D's Arc() worked correctly.

I have updated from your fpGUI repository just now and it is including commit:
AggPas: agg_2D's Arc() implementation had parameters in the wrong order.

With that change I needed to change what I called the start and sweep (end) angles.. but it's still leaving out the 3rd arc.  I have attached the modified sample program for your evaluation.

I realize Arcto() and Arc() work differently, but the Arc I am trying to display is a valid Arc segment with either method.

Thank you for your help with this

James




-----Original Message-----
From: fpc-pascal [mailto:fpc-pascal-bounces at lists.freepascal.org] On Behalf Of Graeme Geldenhuys
Sent: Wednesday, August 30, 2017 2:51 PM
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal] Agg Pas Arcs

Hi James,

On 2017-08-30 17:10, James Richters wrote:
>>From the above, it seems you implemented your own Arc() procedure. Is that correct?
> No, it's the Agg2D Arc Function:
> http://www.crossgl.com/aggpas/documentation/#Arc
> 
>> Could you try using my version of AggPas and see how that goes for you.
> Yes I am using your version already
> 
>> If there is a bug in ARC, I would like to resolve it.
> I can supply a complete sample program if it would help.  I would like to resolve this as well, I'm very happy with AggPas for my application.


Please get a fpGUI repository update so you have the latest AggPas from there. I found a bug in Agg_2D's Arc() implementation, and it didn't match the documentation's sample output. Yet the Agg2D's Arc() worked correctly.

Here is the commit log.

===============================
commit 3dfce61fd9a3abba7d8a3825b8fa677bb75907e0 (HEAD -> develop, sourceforge/develop, github/develop)
Author: Graeme Geldenhuys <graemeg at gmail.com>
Date:   Wed Aug 30 19:43:19 2017 +0100

     AggPas: agg_2D's Arc() implementation had parameters in the wrong
     order.

     If you compared the Agg2D vs the Agg_2D Arc() behaviour you would
     see they
     give different results. After this commit they generate the
     same [correct] output.

  src/corelib/render/software/agg_2D.pas  | 2 +-
  src/corelib/render/software/agg_arc.pas | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-) ===============================


Further I looked into the implementation details of Arc() and ArcTo(). 
They use totally different arc implementations. ArcTo() is based on a bezier arc, whereas Arc() doesn't.


Regards,
   Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Agg2DConsole arc.pas
Type: application/octet-stream
Size: 2993 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170830/f09dad67/attachment.obj>


More information about the fpc-pascal mailing list