diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-05-19 15:21:13 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-05-19 15:21:13 +0200 |
commit | 4bba0267888beeb11d777e378b6db589b20cc53c (patch) | |
tree | ae865ce37ece4d4ef095aa40e916f0674bc6f8f5 /draw | |
parent | 40ee402b402be76ee004ba3fc8ad5170140e7f12 (diff) | |
download | mupdf-4bba0267888beeb11d777e378b6db589b20cc53c.tar.xz |
Treat rectangular clip paths as a special case using scissoring rectangles.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/pathscan.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/draw/pathscan.c b/draw/pathscan.c index 35cf2d39..ebf9502a 100644 --- a/draw/pathscan.c +++ b/draw/pathscan.c @@ -222,6 +222,21 @@ fz_sortgel(fz_gel *gel) } } +int +fz_isrectgel(fz_gel *gel) +{ + /* a rectangular path is converted into two vertical edges of identical height */ + if (gel->len == 2) + { + fz_edge *a = gel->edges + 0; + fz_edge *b = gel->edges + 1; + return a->y == b->y && a->h == b->h && + a->xmove == 0 && a->adjup == 0 && + b->xmove == 0 && b->adjup == 0; + } + return 0; +} + /* * Active Edge List -- keep track of active edges while sweeping */ |