Re: GTK+ books



>From:	Sven Neumann <sven gimp org>
>
>> I checked drawing area widget page in the tutorial but it is empty.
>> The drawing area widget is at the top among widgets where I start
>> wishing better documentation and tools. It is the place where GTK+
>> ends too soon.
>
>There are the two scribble examples in the GTK+ tutorial that explain
>GTK+/GDK drawing pretty well.

I find it difficult to keep up various states of the tools
which I want code.

I have a modification of the original scribble which has a small
rectangle drawing area by default, and more drawing areas can be
added by pressing a button. All drawing areas can be grabbed and
moved, in wich case they raise at front and follow the pointer.
It has a couple of states and tmp variables used when dragging,
but the code looks messy.

Some kind of state graph routines with state variables would be nice.
I have gathered papers on these topics and people have written
some kind of state graph systems. Perhaps similar could be provided
by GTK.

My modified scribble has evolved to software which with I can
paint on large float RGB images. Again the images can be grabbed
and dragged. Now the problem is that I don't anymore have multiple
drawing areas which naturally isolates the events -- now I have to
provide my own routines to maintain the multiple images (because
all events go to one place only: to drawing area).

If the GTK widget system would be extended inside the OpenGL
(see my Widget Portal mail in gtk-app-devel), then I could
create one polygon per image, receive events to polygons, have
callbacks for each polygon. Image rotations and zooms would be
easy now, and they could be painted on.

As said, it all stops to drawing area. Beyond that I have to
start from scratch.

BTW, I'm still looking toward the GIMP rectangle selection tool.
It may take while because I yet again started doing a perfect
job: first a constraint based system, then any vector manipulations
are easier to do. When I grab a selection tool edge or vertex,
I just set up a constraint which forces the rectangle (or part of
it) to follow pointer implicitly. The rectangle tool is simple but
I want save the trouble when I want a more complex tool.

That kind of systems could be part of GTK.

Regards,
Juhana



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