Re: affine_rotate a text canvas item

GnomeCanvasHacktext seems to do the trick. There's a typo in gnome-canvas-hacktext.c (part of libgnomeprintui-1.116.0)

- gtk_object_add_arg_type ("GnomeCanvasHacktext::font", GTK_TYPE_OBJECT, GTK_ARG_READWRITE, ARG_FONT); + gtk_object_add_arg_type ("GnomeCanvasHacktext::font", GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_FONT);

What stops rotation from working with the stock GnomeCanvasText item? Is this something that needs to be implemented in pango?

Ryan Gammon wrote:

I'm trying to rotate a line of text by 10 degrees with the code below. In the rendered result, the text appears unrotated.

I'm using gnome_canvas_new_aa(), and libgnomecanvas version 2.0.4.

If you know of an application that successfully uses text rotation, or if you have any suggestions, I'd appreciate it.

  double rotate_affine[6];
  GnomeCanvasItem *item;
    item = gnome_canvas_item_new(GNOME_CANVAS_GROUP(graph->y_axis_group),
                        "x", (double)0,
                        "y", (double)0,
                        "anchor", GTK_ANCHOR_WEST,
                        "font", "variable",
                        "fill_color", "white",
                        "text","yabba dabba doo",
NULL); art_affine_rotate(rotate_affine, 10);
  gnome_canvas_item_affine_relative(item, rotate_affine);

gnome-devel-list mailing list
gnome-devel-list gnome org

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