From 4bba0267888beeb11d777e378b6db589b20cc53c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 19 May 2010 15:21:13 +0200 Subject: Treat rectangular clip paths as a special case using scissoring rectangles. --- draw/pathscan.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'draw') 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 */ -- cgit v1.2.3