On Sat, 03 Aug 2013 06:16:26 -0400 Timothy Groves <[email protected]> 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); > FontMgr.SearchPath:='/usr/share/fonts/truetype/ttf-dejavu/'; > 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? Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
