View Full Version : problem with TextOut
neafriem
02-02-2005, 08:07 PM
I have a problem. When I use the textout code the text is written on the screen but with black times new roman with white background. I want the text background to be transparent and the text in an other color. It is possible?
Bufferbox.Canvas.TextOut(posX, posY, Text);
{MSX}
02-02-2005, 08:16 PM
If i can remember well you can use:
Bufferbox.brush.style:=bsClear;
or something similar :)
Traveler
02-02-2005, 08:17 PM
yes it is possible. You have to set the brush style to bsclear like this
Bufferbox.Canvas.brush.style := bsclear;
and then render the font..
Alternative colors can be achieved by setting the font color.
Bufferbox.Canvas.Font.Color := $ABCDEF;
Edit: Ahh shoot {MSX} you beat me to it by one minute.
Yours is almost right, Brush is a property of the canvas.
neafriem
02-02-2005, 08:43 PM
thanks :D
neafriem
02-02-2005, 08:54 PM
but how do you change the font?
{MSX}
02-02-2005, 08:59 PM
Edit: Ahh shoot {MSX} you beat me to it by one minute.
Yours is almost right, Brush is a property of the canvas.
Too bad, i missed that step :P
JSoftware
02-02-2005, 09:08 PM
canvas.font.name := 'Arial';
yes sir! 8)
neafriem
02-02-2005, 09:46 PM
thanks again
this forum is the best :!: :D :!:
this forum is the best :!: :D :!:
:D
Traveler
03-02-2005, 08:44 AM
this forum is the best :!: :D :!:
Your questions were easy :) Wait till you start asking about say for example how to do a gameloop and whether it should take all cpu power. Suddenly you see 20 different opinions. :wink:
But yeah, this forum is the best around (for Pascal Game Dev)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.