Free-polygon tool specification
This is the specification for the straight cross between the free selection tool and the new polygon selection tool, developed by Martin Nordholts. One can look at the combined tool as:
- a polygon selection tool with the option to insert freely traced segments in between;
- a free selection tool that connects free segments by polygons.
The free-polygon selection tool is meant to replace both the free and polygon selection tools.
between the lines
In principle the tool is used to build up a polygon, where the nodes shall be one of two types:
- a polygon point, which shall be created by a single click;
- a free segment which shall be created by a drag, in the same way as in the current free selection tool.
The free segment shall have two polygon points incorporated: one at the start (the coordinate where the mouse went down) and on at the end (the coordinate where the mouse went up).
The polygon points shall be displayed as in the new polygon select tool (also the two of a free segment)
straight to the point
The sequence of nodes in a polygon shall be interconnected by straight lines. For a free segment, the start polygon point shall be connected to the previous polygon point and the end polygon point shall be connected to the next polygon point.
Between creating nodes of a free-polygon, the tool shall rubber-band a straight line from the last (end) polygon point created to the mouse pointer coordinate.
start and finish
The creation of a free-polygon shall be able to be started by creating either node type.
The free-polygon shall be completed and closed by the following means:
- clicking on the first (start) polygon point that initiated the creation of this free-polygon;
- hitting the return key; this shall connect the last (end) polygon point with the first (start) polygon point that initiated the creation of this free-polygon by a straight line;
- double clicking; this shall create a final polygon point at the coordinate where the mouse went down the first time of the double click and connect it with the first (start) polygon point that initiated the creation of this free-polygon by a straight line;
on the fly
Before the creation of a free-polygon has been completed, some editing of the intermediate result is possible.
Hitting the backspace or delete key shall delete the last created node, whether polygon point or free segment. If only one node existed, then the whole free-polygon creation the shall be terminated, as if it never happened (for instance: not replace another selection).
Every existing polygon point in the free-polygon shall be able to be grabbed and moved, rubber-banding and adjusting the attached straight-line segments. This shall also apply to the free segments: grabbing either polygon point shall move the whole free segment, rubber-banding and adjusting the attached straight-line segments.
When hovering the mouse within the radius display circle of a polygon point the display circle shall be shown and the line rubber-banding to the mouse coordinate temporarily suspended.
The usual add/subtract/intersect modes of selection creation shall be supported, including the use of shift and control modifier keys. As with the rectangle/oval select tools, it only counts whether the shift/control key was down at the moment selection creation commenced, which is here at the moment the mouse goes down to create the first node.
further tool options
Apart from Antialiasing and Feather edges, this tool shall also have the Auto shrink (+ Shrink merged) functionality as seen in the rect/oval select tools in the tool options.