Re: Text location with pango
- From: "Milosz Derezynski" <internalerror gmail com>
- To: "Toby Roworth" <webmaster orkyden co uk>
- Cc: gtkmm-list gnome org
- Subject: Re: Text location with pango
- Date: Sat, 19 Apr 2008 16:09:58 +0200
Pango::Layout::property_width() should fix it, and for the size problem you could set a size attribute:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classPango_1_1Attribute.html#3a0416112eb702fbf57af03b5fc09842
2008/4/19, Toby Roworth <webmaster orkyden co uk>:
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
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]