Re: Drawing area feature?

On Wed, Apr 18, 2001 at 05:43:39PM +0200, CALMELS Clement wrote:

I want to select an element of a drawing area (rectangle, arc...). How I
could do that?

Am I correctly interpreting your question as: you want to be able to draw
objects to the drawing area (i.e. rectangles, circles, whatever), and be able
to later grab that object and manipulate it in some fashion (i.e. user clicks
in rectangle, so border changes colour)?

There are a couple of ways to do this:  if you don't mind using the
gnome-libs, you might want to check out the gnomecanvas.  It behaves in this
manner "for free."  Otherwise, you'll probably have to do the bookkeeping
yourself: have some rectangle object.  When you get a click event, traverse
your list of objects to see which one was clicked.  Redraw with the
appropriate changes made to the desired object.


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