[poppler] 2 commits - poppler/Gfx.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Wed Mar 20 14:37:50 PDT 2013
poppler/Gfx.cc | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
New commits:
commit 8cbdbc64897a34beb226d4dc4c58095f10013f29
Merge: 2bce2cf a01e2d4
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Mar 20 22:37:06 2013 +0100
Merge remote-tracking branch 'origin/poppler-0.22'
commit a01e2d41fcb638fe340bd3d4d22bd13db245e0fd
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date: Wed Mar 20 22:35:08 2013 +0100
check order bounding box values in tiling pattern
Bug #62369
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 5c9ed35..7047482 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -28,7 +28,7 @@
// Copyright (C) 2008 Michael Vrable <mvrable at cs.ucsd.edu>
// Copyright (C) 2008 Hib Eris <hib at hiberis.nl>
// Copyright (C) 2009 M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
-// Copyright (C) 2009-2012 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag at alfa.de>
// Copyright (C) 2009 William Bader <williambader at hotmail.com>
// Copyright (C) 2009, 2010 David Benjamin <davidben at mit.edu>
// Copyright (C) 2010 Nils Höglund <nils.hoglund at gmail.com>
@@ -2205,10 +2205,20 @@ void Gfx::doTilingPatternFill(GfxTilingPattern *tPat,
//~ edge instead of left/bottom (?)
xstep = fabs(tPat->getXStep());
ystep = fabs(tPat->getYStep());
- xi0 = (int)ceil((xMin - tPat->getBBox()[2]) / xstep);
- xi1 = (int)floor((xMax - tPat->getBBox()[0]) / xstep) + 1;
- yi0 = (int)ceil((yMin - tPat->getBBox()[3]) / ystep);
- yi1 = (int)floor((yMax - tPat->getBBox()[1]) / ystep) + 1;
+ if (tPat->getBBox()[0] < tPat->getBBox()[2]) {
+ xi0 = (int)ceil((xMin - tPat->getBBox()[2]) / xstep);
+ xi1 = (int)floor((xMax - tPat->getBBox()[0]) / xstep) + 1;
+ } else {
+ xi0 = (int)ceil((xMin - tPat->getBBox()[0]) / xstep);
+ xi1 = (int)floor((xMax - tPat->getBBox()[2]) / xstep) + 1;
+ }
+ if (tPat->getBBox()[1] < tPat->getBBox()[3]) {
+ yi0 = (int)ceil((yMin - tPat->getBBox()[3]) / ystep);
+ yi1 = (int)floor((yMax - tPat->getBBox()[1]) / ystep) + 1;
+ } else {
+ yi0 = (int)ceil((yMin - tPat->getBBox()[1]) / ystep);
+ yi1 = (int)floor((yMax - tPat->getBBox()[3]) / ystep) + 1;
+ }
for (i = 0; i < 4; ++i) {
m1[i] = m[i];
}
More information about the poppler
mailing list