I do have another question: I'm writing a legend on the chart. Instead of
using 4 TextOut calls to write the legend on 4 lines, is there a way to do
it with one TextOut call.  Also, is there a way to change the size of the
text?  I see that there is a way to retrieve the size of a string
(GetTextExtentPoint), but how can you change the size (or even font) of the
text.

my $mainfont = new Win32::GUI::Font('-name','Arial','-size',9);
$DC->SelectObject($mainfont);

If you use DrawText rather than TextOut, it should do line breaks (you might need to convert newlines into MS format). See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_0odw.asp

Cheers,

jez.



Reply via email to