[poppler] poppler/poppler: CairoOutputDev.cc, 1.22, 1.23 CairoOutputDev.h, 1.9, 1.10 Makefile.am, 1.13, 1.14 TextOutputDev.cc, 1.15, 1.16

Kristian Høgsberg krh at freedesktop.org
Sat Dec 3 15:23:55 PST 2005


Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv6716/poppler

Modified Files:
	CairoOutputDev.cc CairoOutputDev.h Makefile.am 
	TextOutputDev.cc 
Log Message:
2005-12-03  Kristian Høgsberg  <krh at redhat.com>

        * qt/Makefile.am (noinst_PROGRAMS): Only build qt test program if
        splash is enabled.

        * poppler/CairoOutputDev.cc: Remove unused grid snapping code,
        sidestepping #4507.

        * glib/poppler-document.h (PopplerPermissions): Breaking enum
        definition over multiple lines confuses glib-mkenums (#4600).

        * poppler/Makefile.am (libpoppler_la_LIBADD): Add FREETYPE_LIBS
        (#4515).

        * poppler/TextOutputDev.cc:
        * qt/poppler-qt.h: GCC-4.1 fixes (#5031).




Index: CairoOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDev.cc,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- CairoOutputDev.cc	3 Dec 2005 21:55:36 -0000	1.22
+++ CairoOutputDev.cc	3 Dec 2005 23:23:53 -0000	1.23
@@ -33,8 +33,6 @@
 
 //------------------------------------------------------------------------
 
-#define soutRound(x) ((int)(x + 0.5))
-
 // #define LOG_CAIRO
 
 #ifdef LOG_CAIRO
@@ -276,8 +274,7 @@
   cairo_set_font_matrix (cairo, &matrix);
 }
 
-void CairoOutputDev::doPath(GfxState *state, GfxPath *path,
-			    GBool snapToGrid) {
+void CairoOutputDev::doPath(GfxState *state, GfxPath *path) {
   GfxSubpath *subpath;
   double x1, y1, x2, y2, x3, y3;
   int i, j;
@@ -286,9 +283,6 @@
     subpath = path->getSubpath(i);
     if (subpath->getNumPoints() > 0) {
       state->transform(subpath->getX(0), subpath->getY(0), &x1, &y1);
-      if (snapToGrid) {
-	x1 = round (x1); y1 = round (y1);
-      }
       cairo_move_to (cairo, x1, y1);
       LOG (printf ("move_to %f, %f\n", x1, y1));
       j = 1;
@@ -297,11 +291,6 @@
 	  state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1);
 	  state->transform(subpath->getX(j+1), subpath->getY(j+1), &x2, &y2);
 	  state->transform(subpath->getX(j+2), subpath->getY(j+2), &x3, &y3);
-	  if (snapToGrid) {
-	    x1 = round (x1); y1 = round (y1);
-	    x2 = round (x2); y2 = round (y2);
-	    x3 = round (x3); y3 = round (y3);
-	  }
 	  cairo_curve_to (cairo, 
 			  x1, y1,
 			  x2, y2,
@@ -310,9 +299,6 @@
 	  j += 3;
 	} else {
 	  state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1);
-	  if (snapToGrid) {
-	    x1 = round (x1); y1 = round (y1);
-	  }
 	  cairo_line_to (cairo, x1, y1);
 	  LOG(printf ("line_to %f, %f\n", x1, y1));
 	  ++j;
@@ -327,14 +313,14 @@
 }
 
 void CairoOutputDev::stroke(GfxState *state) {
-  doPath (state, state->getPath(), gFalse);
+  doPath (state, state->getPath());
   cairo_set_source (cairo, stroke_pattern);
   LOG(printf ("stroke\n"));
   cairo_stroke (cairo);
 }
 
 void CairoOutputDev::fill(GfxState *state) {
-  doPath (state, state->getPath(), gFalse);
+  doPath (state, state->getPath());
   cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
   cairo_set_source (cairo, fill_pattern);
   LOG(printf ("fill\n"));
@@ -342,7 +328,7 @@
 }
 
 void CairoOutputDev::eoFill(GfxState *state) {
-  doPath (state, state->getPath(), gFalse);
+  doPath (state, state->getPath());
   cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
   cairo_set_source (cairo, fill_pattern);
   LOG(printf ("fill-eo\n"));
@@ -350,14 +336,14 @@
 }
 
 void CairoOutputDev::clip(GfxState *state) {
-  doPath (state, state->getPath(), gFalse);
+  doPath (state, state->getPath());
   cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
   cairo_clip (cairo);
   LOG (printf ("clip\n"));
 }
 
 void CairoOutputDev::eoClip(GfxState *state) {
-  doPath (state, state->getPath(), gFalse);
+  doPath (state, state->getPath());
   cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
   cairo_clip (cairo);
   LOG (printf ("clip-eo\n"));
@@ -395,13 +381,10 @@
   if (!currentFont)
     return;
    
-  // check for invisible text -- this is used by Acrobat Capture
+  // ignore empty strings and invisible text -- this is used by
+  // Acrobat Capture
   render = state->getRender();
-  if (render == 3)
-    return;
-
-  // ignore empty strings
-  if (glyphCount == 0) {
+  if (render == 3 || glyphCount == 0) {
     gfree(glyphs);
     glyphs = NULL;
     return;

Index: CairoOutputDev.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDev.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CairoOutputDev.h	3 Dec 2005 21:55:36 -0000	1.9
+++ CairoOutputDev.h	3 Dec 2005 23:23:53 -0000	1.10
@@ -133,7 +133,7 @@
   void setSurface (cairo_surface_t *surface);
 
 protected:
-  void doPath(GfxState *state, GfxPath *path, GBool snapToGrid);
+  void doPath(GfxState *state, GfxPath *path);
   
   GfxRGB fill_color, stroke_color;
   cairo_pattern_t *fill_pattern, *stroke_pattern;

Index: Makefile.am
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Makefile.am	20 Sep 2005 09:57:41 -0000	1.13
+++ Makefile.am	3 Dec 2005 23:23:53 -0000	1.14
@@ -90,7 +90,8 @@
 	$(cairo_libs)				\
 	$(arthur_libs)				\
 	$(libjpeg_libs)				\
-	$(zlib_libs)
+	$(zlib_libs)				\
+	$(FREETYPE_LIBS)
 
 poppler_includedir = $(includedir)/poppler
 poppler_include_HEADERS =	\

Index: TextOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/TextOutputDev.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- TextOutputDev.cc	3 Dec 2005 21:55:36 -0000	1.15
+++ TextOutputDev.cc	3 Dec 2005 23:23:53 -0000	1.16
@@ -3086,7 +3086,7 @@
   virtual void visitWord (TextWord *word, int begin, int end,
 			  PDFRectangle *selection) { };
 
-  GooString *TextSelectionDumper::getText(void);
+  GooString *getText(void);
 
 private:
   TextLineFrag *frags;



More information about the poppler mailing list