[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: SelectionTool
From:       Sven Fischer <herpes () kawo2 ! rwth-aachen ! de>
Date:       1999-08-19 14:25:20
[Download RAW message or body]

Matthias Elter <me@main-echo.net> writes:

>  Hm, how are you going to render the selection? Animated selections
> (moving rubber band) are a must as it really helps to see complex
> selections. How do you propose to make the selection based on a
> grayscale layer visible? Render the layer into the image? This is to
> slow for animated selections. My opinion still is that we should go
> with QRegions to describe the selected area. You can easily draw the
> polygon described by a QRegion directly on the canvasview
> widget. You are right a selection area can become rather
> large/complex and a QRegion to describe the polygon may contain
> hundrets of points. But IMO the QRegion code is fast enough even
> with several hundret points.  QRegion::contains(const QPoint&) is
> quite fast, we simply have to test the performance. You can still
> feather a selection based on a QRegion as only the borders of the
> selection are feathered.  -> A selection is described by the
> selected area (QRegion) and a feather value. The tools and filters
> then have to handle the actual feathering.

That's basically what I was thinking also. If you have complex
feathered regions selected, one could imagine that the Selection
returns something like a greyscale pixmap, so that e.g. the fill tool
can decide where or hoy to do the fill instead of asking the Selection 
for every pixel if it is in the region or not. But the selection
itself is easier Matthias' way, especially for geometric regions.

cu Sven

-- 
  __ 
 /_. Sven Fischer - Kastanienweg 33, D-52074 Aachen, +49-(0)241-875173
/ /                 http://www.kawo2.rwth-aachen.de/~sven - GPG key available

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic