Re: Zooming of text-item in a Gnome Canvas



Hi Arnaldo,

Arnaldo de Moraes Pereira wrote:
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.

many thanks for your reply. I have set the size via "size-points" as when using
"size" the text was always just flyspeck.

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) ?

That is what I would like to avaoid. I have connected two callback to two
toolbar buttons, that just change the pixels_per_unit().
It would be nasty, if I would have to iterate over all the items, check if they
are TEXT items and then change their scale property.
Sorry my poor english.
No need to excuse ;-)

Arnaldo M. Pereira

Stefan

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




_______________________________________________
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]