[Qt] Rotated font

Hess, Philip J pjhess at purdue.edu
Wed Nov 15 22:04:00 CET 2006


Felipe,

Yes, that's a workaround for now. I agree that it's probably the Canvas.Font.Handle not getting set, because this doesn't work:

   Canvas.Font.Handle := MyFont;
   SelectObject(Canvas.Handle, Canvas.Font.Handle);
   ExtTextOut(Canvas.Handle, 100, 100, ETO_CLIPPED,
              @ARect, 'Rotated text', 12, nil);

Note that all of these methods work fine with win32 widgetset.

I understand that the gtk widgetset doesn't support rotated fonts. What exactly is the limitation there? Doesn't use TrueType fonts?

Thanks.

-Phil


-----Original Message-----
From: qt-bounces at lazarus.freepascal.org [mailto:qt-bounces at lazarus.freepascal.org] On Behalf Of Felipe Monteiro de Carvalho
Sent: Wednesday, November 15, 2006 2:56 PM
To: Items specific to the Qt widget set
Subject: Re: [Qt] Rotated font

On 11/15/06, Hess, Philip J <pjhess at purdue.edu> wrote:
> However, the TRotatedLabel control I'm porting to LCL uses a different way
> of drawing the rotated text (method 2 below) and this does not work with the
> Qt widgetset, although it works fine with the win32 widgetset. I wonder if
> the ExtTextOut API function is not fully working with Qt widgetset yet.
> Here's the test code, using both methods of drawing rotated text:

Canvas.TextOut uses ExtTextOut to draw the text. Maybe it´s a problem
setting the font handle.

Can you test this variant:

   SelectObject(Canvas.Handle, MyFont);
   ExtTextOut(Canvas.Handle, 100, 100, ETO_CLIPPED,
              @ARect, 'Rotated text', 12, nil);  //Method 2 - does not work

thanks,
-- 
Felipe Monteiro de Carvalho
_______________________________________________
Qt mailing list
Qt at lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/qt



More information about the Qt mailing list