#225 Support for complex polygons in canvas


[This was originally Tcl FRQ #1266238]
This is a request for support of complex polygons in canvases.

Such grapic items are common in computer graphics.


Alternative 1: Extend the current polygon item.

The current "create polygon" command is extended so the coordinates can be specified as a list of lists of coordinates, each list comprise a part of the polygon, with the outer polygin first. This alternative requieres that the current command determines what kind of list it has as parameter, and takes the appropriate action.

Aternative 2: New compound item.

New command "create compond <list> <options>...", with syntax as "create polygon" as above where <list> is a list of list of coordinates.

Alternative 3: New complex item

New command "create complex <ti1> <ti2> ..." where <ti?> is a tag or identifier identifying existing items in the canvas. These items may now be considered as a 'group', with a single identity. It may then be possible to specify as an option "-eofill 1" to specify that polygons in the group is to be painted with even-odd fill.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks