Re: Pango rotation



On 12/11/2009 07:58 AM, Edder wrote:
Hi all,

I am currently using cairomm (c++ bindings to cairo) to render some
graphs, but wanted to start including pangomm support for more
complicated text. One of the things I wanted to do was rotate text,
but I can't seem to get it to work. I first tried to use gravity to do
it and later also tried it with
layout->get_context()->set_matrix(...). I also tried setting it after
update_from_cairo_context, because I thought that might unset the
rotation, but that didn't seem to help either.

Furthermore I am interested in centering the text (instead of left
aligned). I tried to do this with set_alignment, but this also didn't
seem to work. I solved that by using get_pixel_size, but would still
be interested if this can be done in a better way.

I hope someone can help me. For sample code see below.

cr->rotate().

behdad


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