diff options
author | Albert Astals Cid <aacid@kde.org> | 2011-08-30 16:36:24 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2011-08-30 16:43:51 +0200 |
commit | faaba717046ba87ef5ded614e2bcab6260a9f7c2 (patch) | |
tree | a5dc1ca187cee56b83ec29992e537b12c328341b /splash/SplashXPath.cc | |
parent | 73efc96eef6bd32a7c058b7dda8101f4f23c454f (diff) |
xpdf303: FixedPoint improvements
Diffstat (limited to 'splash/SplashXPath.cc')
-rw-r--r-- | splash/SplashXPath.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/splash/SplashXPath.cc b/splash/SplashXPath.cc index 37d164d3..c51c9083 100644 --- a/splash/SplashXPath.cc +++ b/splash/SplashXPath.cc @@ -289,7 +289,11 @@ void SplashXPath::addCurve(SplashCoord x0, SplashCoord y0, SplashCoord dx, dy, mx, my, d1, d2, flatness2; int p1, p2, p3; +#if USE_FIXEDPOINT + flatness2 = flatness; +#else flatness2 = flatness * flatness; +#endif // initial segment p1 = 0; @@ -315,12 +319,17 @@ void SplashXPath::addCurve(SplashCoord x0, SplashCoord y0, // line) mx = (xl0 + xr3) * 0.5; my = (yl0 + yr3) * 0.5; +#if USE_FIXEDPOINT + d1 = splashDist(xx1, yy1, mx, my); + d2 = splashDist(xx2, yy2, mx, my); +#else dx = xx1 - mx; dy = yy1 - my; d1 = dx*dx + dy*dy; dx = xx2 - mx; dy = yy2 - my; d2 = dx*dx + dy*dy; +#endif // if the curve is flat enough, or no more subdivisions are // allowed, add the straight line segment |