Re: Zooming of text-item in a Gnome Canvas



Hi Stefan,

The gnome-canvas behavior is right. gnome_canvas_set_pixels_per_unit()
is responsible for setting the zooming factor of the canvas, indeed,
but it just changes the relation between pixels and canvas units, it
doesn't change the "size" attribute of a GnomeCanvasText.

So, calling gnome_canvas_set_pixels_per_unit() will just change the
position of the text on the canvas area, not it's size.

According to my gnome-canvas-text.h, GnomeCanvasText has an attribute
called "size_points", which you can use to set the size of the text on
canvas units. However, I don't see it on _GnomeCanvasText structure -
I'll take a look at this issue later, as long as I'll need it.

Can you change the text size by calling gnome_canvas_item_set (item,
"scale", 2.0), or gnome_canvas_item_set (item, "size_points", value) ?

Sorry my poor english.

Arnaldo M. Pereira


On Fri, 10 Sep 2004 18:13:58 +0200, Stefan Kost
<kost imn htwk-leipzig de> wrote:
hi hi,
I zoom in/out in a gnome-canvas with gnome_canvas_set_pixels_per_unit().
This make items like GNOME_TYPE_CANVAS_RECT smaller/bigger, but those of type
GNOME_TYPE_CANVAS_TEXT remain unscaled.

Anyone knows what I am doing wrong?

Ciao
  Stefan
--
http://www.buzztard.org
http://www.sonicpulse.de
http://www.eksor.de



_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list






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