[Glade-users] GnomeCanvas co-ordinates.



Hi,
firstly, thanks to those involved in writing the program.  I'm only a
newbie (to programming at all), but glade really helps to build
confidence....

OK, the problem is:
I'm trying to draw rectangles, or text (these are the 2 GnomeCanvasItems
that I need to use) onto a GnomeCanvas, but the x = 0.0, y = 0.0 postion
seems to be in the centre of the Canvas.  Hence, a GnomeCanvasRect (for
example) is always placed at the south west area of the canvas.  In
other canvases from my 2 books on GTK/Gnome a new CanvasItem would be
placed according to 0.0, 0.0 being in the top left corner of the canvas.

Does anyone have this problem?  Examples from the book  'Beginning
GTK+/GNOME Programming'
(ftp://ftp.wrox.com/beginning/3811.tar.gz)
(chapter 15) seem to work OKwith seemingly 'normal' positioning of the
CanvasItems, but as soon as I make a canvas with glade, I get this
positioning problem.  Am I using the wrong co-ordinate system perhaps (I
don't think so, but I am a newbie!).  Am I setting up the root Group
incorrectly?  Are there any settings in Glade which I may be using
erroneously!?

I've looked in the interface.c file, and nothing looks strange about the
way Glade sets up the canvas BTW.

Thanks in advance for any advice, 'cos I've wasted ages trying to figure
out what's going on!

Mark.

P.S.  I can send an example glade file and code to interested
parties.......

--
Mark Brooks,
EMBL Grenoble Outstation,
6, rue Jules Horowitz, BP181
38042 Grenoble Cedex 9, France.
Tel: + (0)4 76 20 72 85








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