[Lazarus] Changing font colour
nc-gaertnma at netcologne.de
Sat Aug 3 13:34:00 CEST 2013
On Sat, 03 Aug 2013 06:16:26 -0400
Timothy Groves <the.tail.kinker at gmail.com> wrote:
> So I've got a program that saves a graphic image, and I copied chunks of
> it from http://wiki.freepascal.org/fcl-image because I'm new at this.
> However, whenever I draw text, it comes out in black, and I wish to be
> able to change the colour. I've hunted online and through the source
> code, and nothing seems to work. Can someone tell me what I'm doing wrong?
> Image := TFPMemoryImage.Create (1025,513);
> Image.UsePalette := FALSE;
> Canvas := TFPImageCanvas.Create (Image);
> AFont := TFreeTypeFont.Create;
> Canvas.brush.FPCOlor := colWhite;
> Canvas.pen.FPColor := colWhite;
> Canvas.Font := aFont;
> Canvas.Font.Name := 'DejaVuSerif';
> Canvas.Font.Size := 6 + ZoomFactor;
Have you tried changing Canvas.Font.Color?
More information about the Lazarus