gtk pango draw rotated text



Hi,

I want to draw some rotated text on a Window. I've tried every code I
found on the net but still no solution :(

I would like to draw some rotated text on a window, the rotation point
should X,Y and not to the center of the rectangle where the text is
draw.

Can anyone please help me?

This is my current code (in pascal):

WidgetCont := pango_layout_get_context(UseFont);
rotated_matrix.xx := 1.0;
rotated_matrix.xy := 0.0;
rotated_matrix.yx := 0.0;
rotated_matrix.yy := 1.0;
rotated_matrix.x0 := 0.0;
rotated_matrix.y0 := 0.0;
pango_matrix_rotate (@rotated_matrix, 45);
pango_context_set_matrix (WidgetCont, @rotated_matrix);
pango_layout_context_changed (UseFont); 
gdk_draw_layout_with_colors(DevCtx.drawable, DevCtx.GC, X, Y, UseFont,
Foreground, nil);


Thanks in advance.

Luis




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