[Java-gnome-developer] Drawing with Cairo: Coordinates
Brought to you by:
afcowie
From: Goundy <go...@gm...> - 2009-09-17 02:04:26
|
Hi guys, I've a quick question. I just noticed that when drawing with cairo, in the expose event I have to create a context and give it the returns of source.getWindow(), this returns the whole application window so X and Y I set to draw my picture to are calculated regarding the Window and not the *drawing area* I use which for me is an Image. I have an interface that contains a drawing area and lot of other staff on top of this area (buttons, entries,... etc), so y question is: There's not an easier solution to handle coordinates instead of having to do staff like: draw to: x = topButton1.x + topButton2.x + topEntry.1 + .... y = topButton1.Y + topButton2.Y..... ? I hope it's clear Thank you Miloud B. |