[Lazarus] PDF generator, try 2

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Sat Apr 2 15:12:06 CEST 2016


On 2016-04-01 20:16, Jesus Reyes A. wrote:
>    P.WriteUTF8Text(15, 120, 'Languages: English: Hello, World!');
>    P.WriteUTF8Text(40, 130, 'Greek: -FÃåéÜ óïõ êüóìïò');
>    P.WriteUTF8Text(40, 140, 'Polish: Witaj -B¶wiecie');
>    P.WriteUTF8Text(40, 150, 'Portuguese: Ol-Aá mundo');
> 
> Of course, before DoUnitConversion(p1); there should be a  
> DoMatrixTransform(p1); etc.

That does indeed look much better. The origin of the external matrix
usage is quite simple really... Initially there wasn't a matrix, and
coordinates had to be calculated (PDF's origin point is bottom/left of
the page) manually before passed to drawing routines. Introducing Matrix
was the first step in cleaning up the code.

Your recommendation is the next step and already on my todo list. I'll
make the change and adapt the demos. This will affect the fpReport code
too (hence it wasn't done yet), but the changes really aren't that big.
I'll make the change in this coming week.

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 Lazarus mailing list