[poppler] poppler with fixed point arithmetic

Frank Meerkötter frank at meerkoetter.org
Mon Feb 6 11:28:13 PST 2006


Albert Astals Cid wrote:

>>I've played around with it but had mixed results:
>>  - using the 0.5.0 developement release it doesn't compile right away.
>>    Changing #define USE_FIXEDPOINT in config.h into #define USE_FIXEDPOINT
>>1 and adding one or two casts fixed that.
>>    
>>
>
>Can you contribute the patch back?
>  
>

I've attached a patch against the current cvs version. The patch makes 
poppler
compile with --enable-fixedpoint.

Regards,
  Frank
-------------- next part --------------
diff -ur poppler_orig/configure.ac poppler/configure.ac
--- poppler_orig/configure.ac	2006-01-23 19:52:48.000000000 +0100
+++ poppler/configure.ac	2006-02-06 19:47:13.000000000 +0100
@@ -31,7 +31,7 @@
 
 AC_ARG_ENABLE(fixedpoint,
 [  --enable-fixedpoint     use fixed point (instead of floating point) arithmetic],
-AC_DEFINE(USE_FIXEDPOINT, [], [Use fixed point arithmetic]))
+AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic]))
 
 dnl ##### Path to xpdfrc.
 dnl This ugly kludge to get the sysconfdir path is needed because
Only in poppler: depcomp
Only in poppler/fofi: Makefile.in
Only in poppler/glib: Makefile.in
Only in poppler/glib/reference: Makefile.in
diff -ur poppler_orig/goo/FixedPoint.h poppler/goo/FixedPoint.h
--- poppler_orig/goo/FixedPoint.h	2005-09-16 20:29:18.000000000 +0200
+++ poppler/goo/FixedPoint.h	2006-02-06 19:56:00.000000000 +0100
@@ -11,7 +11,7 @@
 #ifndef FIXEDPOINT_H
 #define FIXEDPOINT_H
 
-#include <aconf.h>
+#include <config.h>
 
 #if USE_FIXEDPOINT
 
Only in poppler/goo: Makefile.in
Only in poppler: install-sh
Only in poppler: ltmain.sh
Only in poppler: missing
Only in poppler: poppler
Only in poppler_orig/: poppler_orig
Only in poppler/qt: Makefile.in
Only in poppler/qt4: Makefile.in
Only in poppler/qt4/src: Makefile.in
Only in poppler/qt4/tests: Makefile.in
Only in poppler/splash: Makefile.in
diff -ur poppler_orig/splash/Splash.cc poppler/splash/Splash.cc
--- poppler_orig/splash/Splash.cc	2005-10-30 21:29:05.000000000 +0100
+++ poppler/splash/Splash.cc	2006-02-06 19:59:03.000000000 +0100
@@ -2020,10 +2020,10 @@
 	  for (xx = 0, x1 = x0 - glyph->x; xx < glyph->w; ++xx, ++x1) {
 	    alpha = *p++;
 	    if (softMask) {
-	      alpha = (int)(alpha * state->fillAlpha *
+	      alpha = (int)(alpha * (float)state->fillAlpha *
 			    softMask->data[y1 * softMask->rowSize + x1]);
 	    } else {
-	      alpha = (int)(alpha * state->fillAlpha);
+	      alpha = (int)(alpha * (float)state->fillAlpha);
 	    }
 	    if (alpha > 0) {
 	      if (noClip || state->clip->test(x1, y1)) {
Only in poppler/splash: Splash.cc~
diff -ur poppler_orig/splash/SplashTypes.h poppler/splash/SplashTypes.h
--- poppler_orig/splash/SplashTypes.h	2005-10-30 21:29:05.000000000 +0100
+++ poppler/splash/SplashTypes.h	2006-02-06 20:06:19.000000000 +0100
@@ -14,7 +14,7 @@
 //------------------------------------------------------------------------
 
 #if USE_FIXEDPOINT
-#include "FixedPoint.h"
+#include "goo/FixedPoint.h"
 typedef FixedPoint SplashCoord;
 #else
 typedef double SplashCoord;
Only in poppler/test: Makefile.in
Only in poppler/utils: Makefile.in


More information about the poppler mailing list