Text location with pango



When drawing to a drawing area 1024x768 pixels using Pango and Cairo, I am having trouble getting the text centered within the whole window and changing the font size.

I am trying to center it with:

pangoLayout -> set_alignment(Pango::ALIGN_CENTER);

which centers it to the width of the longest line in the layout, not the whole width. set_width(1024) or any other number results in half of thext being off the left hand side of the window

I have been using set_size() on the FontDescription, but his makes no change, although the font does change when set_family() is used.

And help/suggestion would be appreciated

Toby Roworth
--

Sent by Toby Roworth (webmaster orkyden co uk)
This message is intended for the named reciepients only, and should not be forwarded without permission
The conents of this message may be ©Toby Roworth



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]