Juhana Sadeharju <[EMAIL PROTECTED]> writes:
> Here is an alternative rectangle selection tool:
> (1) by pressing the left mouse button, user may drag the (initial)
> (2) when pointer is moved on the selection edges and corners,
> user may grab and drag the edge or the corner,
> (3) selection gets deleted if user pressed mouse button when the
> pointer is not on the edges or the corners.
> That is all what can be done with the tool. There is no possibility to
> enlarge the selection the way the current rectangle selection can be
The point is that you misunderstood what a selection is. A selection
is a mask holding a selection value between 0 and 255 for each pixel
in the image. What you see on the GIMP canvas is just the selection
border, a line draw along the pixels that are 50% selected. Now if you
create a rectangular selection, you alter the selection mask so that
it looks like a rectangle. The information about the corner points of
the rectangle is not stored anywhere. That's why you cannot edit the
selection the way you suggested.
I am not saying that our selection tools couldn't behave differently,
but I am saying that it would require a major redesign of how GIMP
treats selections. The vectors tool was designed in a way that allows
it to work on other shapes than only bezier curves. We might want to
base a new rectangles tool on this architecture and perhaps it would
even make sense to make this the default rect-select tool.
> The rectangle could be deleted only by clicking outside the
> rectangle, and the whole rectangle could be moved by grabbing inside
> the rectangle. When the selection is moved this way, only the
> selection info is changed and no image data is moved around (as
> happens with the current selection tools).
... unless you press the Alt key.
> I took the latest CVS version. If it compiles, we could only check
> how to get me started for coding these tools.
Well, a good start would be to make yourself familiar with such basic
concepts of image editing as selection masks. This is an important
feature that we cannot live without. A good way to understand
selections is to play with the QuickMask feature. It illustrates
selections quite well.
Gimp-developer mailing list