From a993fd45ebe67946e165cbe579bc3e3a596dcded Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 11 Aug 2024 20:57:51 -0400 Subject: [PATCH] Clarify documentation of draw_polygon()'s coordinate format. Previously, this function's documentation just stated that `coords` contained the X and Y coordinates of the polygon's vertices, without specifying in what order they were listed. Thus, it would have been reasonable to (wrongly) assume that all the X coordinates were listed in the first half of the array, followed by all the Y coordinates. Now it's clear that each point's X and Y coordinates are stored directly next to each other, and in that order. --- devel.but | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devel.but b/devel.but index fd16151..29ef78c 100644 --- a/devel.but +++ b/devel.but @@ -2162,7 +2162,11 @@ This function may be used for both drawing and printing. Draws an outlined or filled polygon in the puzzle window. \c{coords} is an array of \cw{(2*npoints)} integers, containing the -\c{x} and \c{y} coordinates of \c{npoints} vertices. +\c{x} and \c{y} coordinates of \c{npoints} vertices. The \c{x} and +\c{y} coordinates are stored in interleaved order, with each vertex's +\c{x} coordinate before its \c{y} coordinate. For example, the first +vertex's \c{x} and \c{y} coordinates are \c{coords[0]} and +\c{coords[1]}, respectively. \c{fillcolour} and \c{outlinecolour} are integer indices into the colours array returned by the back end function \cw{colours()}