[fpc-pascal] Implementing AggPas with PtcGraph

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Mon Jun 19 16:01:48 CEST 2017


On 2017-06-19 01:35, James Richters wrote:
> The problem is not with rendering with rgb565,  the problem is something in the original that was patched with the setcolor function:
>
> Line 122 of agg_color pas has:
> constructor rgba8.Construct;
> begin
>  b{*}:=int8u(r_ );
>  g:=int8u(g_ );
>  r:=int8u(b_ );
>  a:=int8u(a_ );
>
> end;


WOW, well spotted - and how that went unnoticed for all these years is 
beyond me. Well done for bringing it to our attention.

That is a fundamental bug in AggPas, and something I'll be fixing 
immediately in fpGUI's repository. As for the affects on other code and 
programs. I'll do some testing to see what exact affect it has, and then 
add some notes in the CHANGELOG document describing code-breaking 
changes and recommended fixes.

I have always been in the mind that fundamental code and API's should be 
100% correct, and fixed promptly when a bug is found. Applications that 
are affected by such changes need to be updated - that's the bottom 
line. No point in continue maintaining buggy code and API's and 
guaranteed that things will just get worse in the future - if not 
immediately fixed.

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



More information about the fpc-pascal mailing list