[cairo-commit] test/coverage.c

Chris Wilson ickle at kemper.freedesktop.org
Sat Jun 12 07:29:31 PDT 2010


 test/coverage.c |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

New commits:
commit b1e4df928fb59ee295830d5c0fa26330714f88f2
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Jun 12 15:28:28 2010 +0100

    test/coverage: Refine comments
    
    Joonas didn't like me putting incorrect labels in my comments. Said they
    were misleading and worse than useless. Harsh.

diff --git a/test/coverage.c b/test/coverage.c
index c2dd398..4728088 100644
--- a/test/coverage.c
+++ b/test/coverage.c
@@ -277,13 +277,19 @@ column_triangles (cairo_t *cr, int width, int height)
 		     * edges on either side that may co-align with their
 		     * neighbours:
 		     *
-		     *       ---  .      ---
-		     * 1 /    |   |\      |
-		     *  / 2x  |   | \     |
-		     *       ---  ....    |  1 / x
-		     *             \ |    |
-		     *              \|    |
-		     *               .   ---
+		     *  s ---  .      ---
+		     *  t  |   |\      |
+		     *  e  |   | \     |
+		     *  p ---  ....    |  2 * step = 1 / WIDTH
+		     *          \ |    |
+		     *           \|    |
+		     *            .   ---
+		     *        |---|
+		     *     1 / PRECISION
+		     *
+		     * Each column contains two triangles of width one quantum and
+		     * total height of (x / WIDTH), thus the total area covered by all
+		     * columns in each pixel is .5 * (x / WIDTH).
 		     */
 
 		    cairo_move_to (cr, x + i / (double) PRECISION, y + dy);


More information about the cairo-commit mailing list