summaryrefslogtreecommitdiff
path: root/src/plot
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2010-01-24 20:24:56 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2010-01-24 20:24:56 +0000
commit0b5081f1bb14a923877c83d472e2c1dbd1792277 (patch)
tree43ecbc6f1ab147f587d37a108d15f076c9a76ee3 /src/plot
parentc75d0b5fab5f3143099de1c80e25e611d32b8525 (diff)
downloadlibnsfb-0b5081f1bb14a923877c83d472e2c1dbd1792277.tar.gz
libnsfb-0b5081f1bb14a923877c83d472e2c1dbd1792277.tar.bz2
Update establish_crossing_value() comment to describe what it actually does now. :)
svn path=/trunk/libnsfb/; revision=9903
Diffstat (limited to 'src/plot')
-rw-r--r--src/plot/generic.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plot/generic.c b/src/plot/generic.c
index 429d231..e6856dc 100644
--- a/src/plot/generic.c
+++ b/src/plot/generic.c
@@ -82,15 +82,19 @@ static bool clg(nsfb_t *nsfb, nsfb_colour_t c)
*
* (a) (b) (c) (d)
*
- * Normal crossing (Fig. a) value = 1
- * Vertex crossing (Fig. b) value = 1
- * Vertex not crossing top (Fig. c) value = 1
- * Vertex not crossing bottom (Fig. d) value = 0
*
- * Vertexes are shared between consecitive lines. This function ensures that
+ * Figure (a) values: 1 = 1 -- Odd -- Valid crossing
+ * Figure (b) values: 0 + 1 = 1 -- Odd -- Valid crossing
+ * Figure (c) values: 1 + 1 = 2 -- Even -- Not valid crossing
+ * Figure (d) values: 0 + 0 = 0 -- Even -- Not valid crossing
+ *
+ * Vertices are shared between consecutive lines. This function ensures that
* the vertex point is only counted as a crossing for one of the lines by
* only considering crossings of the top vertex. This is what NetSurf's
* plotter API expects.
+ *
+ * It's up to the client to call this function for both lines and check the
+ * evenness of the total.
*/
static bool establish_crossing_value(int x, int y, int x0, int y0,
int x1, int y1)