Re: Canvas basics
- From: Stefan Kost <kost imn htwk-leipzig de>
- To: Roger Leigh <rleigh whinlatter ukfsn org>
- Cc: Jody Goldberg <jody gnome org>, gtk-app-devel-list gnome org
- Subject: Re: Canvas basics
- Date: Mon, 10 Jan 2005 16:30:10 +0100
Hi Roger,
are you awar of GtkGrid?
http://www.sicem.biz/personal/lgs/projects/gtkgrid/view_project
Stefan
Roger Leigh wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jody Goldberg <jody gnome org> writes:
On Thu, Dec 23, 2004 at 01:45:53PM +0000, Roger Leigh wrote:
One other problem I've run into is text scaling. I can use
gnome_canvas_set_pixels_per_unit to set the canvas scaling factor
(cse-mainwindow.c, line 73). If I change this, the text does not
scale with the other canvas items. How can I get this to work
correctly? At a scaling factor of 1.0, I get an unreadable mess.
For custom canvas item's you are doing the drawing, and hence need
to handle the scaling of text yourself. Have a look at gnumeric's
src/item-bar.c for an example.
Thanks, that was really helpful!
I was able to keep things fairly simple (a bit simpler than
item-bar.c). Since I derived from GnomeCanvasGroup, I was able to
simply mess with PangoFontDescriptions, and then just use
gnome_canvas_item_set to do the changes, which avoids me messing with
PangoFonts directly (presumably at the expense of performance).
Regards,
Roger
- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFB4GbBVcFcaSW/uEgRAu6kAJ95pZghLU2iIqaNEZAI0B2yOXQsbwCfYGEa
fyZGM/eLtEPPvhaTqpuOi9s=
=nu6Q
-----END PGP SIGNATURE-----
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
\|/ Stefan Kost
<@ @> private business
+-oOO-(_)-OOo------------------------------------------------------ - - - - -
| __ Address Simildenstr. 5 HTWK Leipzig, Fb IMN, Postfach 301166
| /// 04277 Leipzig 04251 Leipzig
| __ /// Germany Germany
| \\\/// Phone +49341 2253538 +49341 30766101
| \__/ EMail st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
| WWW www.sonicpulse.de www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - - - -
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]