On 06/30/2015 06:37 AM, Pierre Guillot wrote:
Hello,
(Apologies for cross-posting)
The CICM is pleased to announce the new releases of the Cream Library (v0.4) and the HOA library (v2.2) for Pure Data.
I'd be careful exposing the tk canvas api from within Pd. It's a buggy interface, as evidenced by the off-by-one errors in the data-structure illustrations of Miller's book.
For example: [struct foo float x float y]
[namecanvas bar]
[drawpolygon 0 1 5 5 0 0 -5 5]
[scalar foo 10 10( | [send bar]
Bug: tk draws the points at (5,5) and (0,0) but it excludes the final point at (-5,5).
Worse, the docs erroneously describe this non-feature for the 'rect' subcommand: "The arguments x1, y1, x2, and y2 or coordList (which must have four elements) give the coordinates of two diagonally opposite corners of the rectangle (the rectangle will include its upper and left edges but not its lower or right edges)."[1]
Yet 'rect' doesn't actually suffer from this problem: it includes the the lower and right edges.
-Jonathan