[Lazarus] TextHeight in Console App

Edilson Vieira vieira.edilson at gmail.com
Tue May 14 16:51:57 CEST 2013


2013/5/14 Graeme Geldenhuys <graeme at geldenhuys.co.uk>

> On 2013-05-14 14:07, Edilson Vieira wrote:
> > The project is an Image Generation Program, a console program.
> >
> > The error ocurr when I call the method TextHeight of the Canvas property
> of
> > TBitmap.
>
> You do realize that if you pull in the 'Graphics' unit of LCL, you don't
> have a console app any more, but a GUI app.
>
> I don't really know what you app does, but I would instead use FPImage
> (from Free Pascal's FCL packages), and use freetype (also included with
> fcl-image code). This will mean your app is not LCL dependent, and a
> real console application.
>

The original app reads data from a query and generates an image in a
tabular format with layout/font/colors configured on the same database.
Many images are generated daily so they run as batch processes on a server,
that is why it were made as a console app, no need of interaction with
users.

So I need to calculate the final size of the image based on such
configurations.

You mean use FPImage instead of Graphics?

In this case what should I use instead of TBitmap (defined in Graphics
unit) ?

tks for your attention.

Edilson.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130514/9bc23de8/attachment-0003.html>


More information about the Lazarus mailing list