diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-15 09:44:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-15 10:31:47 +0100 |
commit | 545f30856aac98199a49cf66c72dbcb66c1f3a4f (patch) | |
tree | 995aa743e7390b83718280b2dd770c9b794f6931 /util/show-polygon.c | |
parent | bbe704406ca97cd51ed1fcc76da7648abde36331 (diff) | |
download | cairo-545f30856aac98199a49cf66c72dbcb66c1f3a4f.tar.gz |
stroke: Convert the outlines into contour and then into a polygon
In step 1 of speeding up stroking, we introduce contours as a means for
tracking the connected edges around the stroke. By keeping track of
these chains, we can analyse the edges as we proceed and eliminate
redundant vertices speeding up rasterisation.
Coincidentally fixes line-width-tolerance (looks like a combination of
using spline tangent vectors and tolerance).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'util/show-polygon.c')
-rw-r--r-- | util/show-polygon.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/show-polygon.c b/util/show-polygon.c index 5549cf20a..9571363bd 100644 --- a/util/show-polygon.c +++ b/util/show-polygon.c @@ -202,6 +202,10 @@ polygon_view_draw (PolygonView *self, cairo_t *cr) else mag_x = self->px - size/4 - size; mag_y = self->py - size/2; + if (mag_y < 0) + mag_y = 0; + if (mag_y + size > self->widget.allocation.height) + mag_y = self->widget.allocation.height - size; } cairo_save (cr); { |