aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-12-06 13:25:47 +0000
committerBen Harris <bjh21@bjh21.me.uk>2022-12-06 13:25:47 +0000
commit202b7467d8ad52748eafaf20dfe8136f3f426aad (patch)
tree323a1afd6e65ee89f74922500d2e7e3f1ca68033
parent3e072dff91978e378e39de8cd7410d93689b2f10 (diff)
downloadpuzzles-202b7467d8ad52748eafaf20dfe8136f3f426aad.zip
puzzles-202b7467d8ad52748eafaf20dfe8136f3f426aad.tar.gz
puzzles-202b7467d8ad52748eafaf20dfe8136f3f426aad.tar.bz2
puzzles-202b7467d8ad52748eafaf20dfe8136f3f426aad.tar.xz
Devel docs: explain the specialness of colour 0
It's used to fill the drawing area and also by some front-ends (at least GTK and JavaScript) to fill areas around the drawing area.
-rw-r--r--devel.but8
1 files changed, 7 insertions, 1 deletions
diff --git a/devel.but b/devel.but
index 5920ca8..7f0e871 100644
--- a/devel.but
+++ b/devel.but
@@ -33,7 +33,7 @@ for use by anyone attempting to implement a new puzzle or port to a
new platform.
This guide is believed correct as of \cw{git} commit
-\cw{b967a3ea86d6285457abc2a89e455c8f62d2c22a}. Hopefully it will be
+\cw{9afdd4cca4823fa3b27ad2ca2fec33e04d7ab103}. Hopefully it will be
updated along with the code in future, but if not, I've at least left
this version number in here so you can figure out what's changed by
tracking commit comments from there onwards.
@@ -1221,6 +1221,12 @@ end's default colour as their background, apart from a few which
depend on drawing relief highlights so they adjust the background
colour if it's too light for highlights to show up against it.
+The first colour in the list is slightly special. The mid-end fills
+the drawing area with it before the first call to \cw{redraw()} (see
+\k{backend-redraw}). Some front ends also use it fill the part of the
+puzzle window outside the puzzle. This means that it is usually
+sensible to make colour 0 the background colour for the puzzle.
+
Note that the colours returned from this function are for
\e{drawing}, not for printing. Printing has an entirely different
colour allocation policy.