Re: Canvas basics
- From: John Coppens <john jcoppens com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Canvas basics
- Date: Fri, 24 Dec 2004 14:20:33 -0300
Roger
This sounds very much like a problem I had a few days ago. I changed the
coordinate conversion routines from gnome_canvas_c2w to
gnome_canvas_window_to_world, this last function takes into account the
centering if zooming out.
John
On Thu, 23 Dec 2004 13:45:53 +0000
Roger Leigh <rleigh whinlatter ukfsn org> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Al Hooton <al hootons org> writes:
On Thu, 2004-12-23 at 00:17 +0000, Roger Leigh wrote:
<snip lots of canvas stuff>
Roger, have you looked at the GtkSheet object in the GtkExtra
project?
http://gtkextra.sourceforge.net/
I haven't used the sheet widget very much, but I'm using the
canvas and
plot widgets extensively. From what I've seen, I believe the sheet
widget, when placed on a canvas widget, may do everything you're
looking for. It might at least be something to look at as a
possibility.
Thanks for the suggestion. It might work quite well, and I'll have a
look into it. However, one reason I want to use the canvas is to
learn more about it. I'm using this simple application as an
experiment.
I've updated the test program I wrote to illustrate what I'm trying to
achieve. It's here:
http://www.whinlatter.ukfsn.org/gtk/cse-0.1.1.tar.gz
I've also made a screenshot:
http://www.whinlatter.ukfsn.org/gtk/cse-screenshot.png
As you can see, the row and column headings are quite complex. When the
user scrolls the canvas, I'd the parts to the top and left of the red
lines to stay stuck to the viewable edge of the canvas (but scroll in
one direction in the same manner as Gnumeric). Later on, I'd like to
add column/row/region selection, cut and paste, drag and drop etc.
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.
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/>
iD8DBQFByswNVcFcaSW/uEgRAorDAKC6QHPtcTEihyX1zWhMn/lpZxHamgCgmvNE
74ukWRjD/aJoltAxKimPhy8=
=aEJ6
-----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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]