Rotated TextOut - Background color

Rotated TextOut - Background color

Post by Anthon » Wed, 15 Dec 2004 20:48:11


Hi all,
I am outputting text to a canvas with the code below.
However, I want to be able to specify the not only the font color but the
background colour.

Now when I am outputting in the normal manner I can just put a rectangle
behind it.

How can I do something similar?
ie - Is there a way I can get the coordinates of a bounding polygon?

or any other way to set the background color?

Many thanks
Ant


with iMap.Canvas do begin
Font.Name := 'Tahoma';
Font.Size := 24;
Font.Color :=
tf := TFont.Create;
tf.Assign(Font);
GetObject(tf.Handle, sizeof(lf), @lf);
lf.lfEscapement := seOrientation.value * 10;
lf.lfOrientation := lf.lfEscapement;
tf.Handle := CreateFontIndirect(lf);
Font.Assign(tf);
tf.Free;
WideCanvasTextOut(iMap.Canvas, 200, Height div 2, tntE.Text);
// TextOut(20, Height div 2, 'Rotated Text!');
end;
 
 
 

Rotated TextOut - Background color

Post by Anthon » Wed, 15 Dec 2004 20:52:45

Ooops - Silly me

It's the brush color.

Apologies!