[poppler] poppler/poppler: CairoFontEngine.cc, 1.2, 1.3 CairoOutputDevImage.cc, 1.1.1.1, 1.2 CairoOutputDevImage.h, 1.1.1.1, 1.2

Kristian Hogsberg krh at freedesktop.org
Tue Apr 5 10:46:46 PDT 2005


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

Modified Files:
	CairoFontEngine.cc CairoOutputDevImage.cc 
	CairoOutputDevImage.h 
Log Message:
2005-04-05  Kristian Høgsberg  <krh at redhat.com>

        * NEWS: Attempt to sum up changes since 0.1.2.

        * configure.ac: Bump release to 0.2.0, add AC_DEFINEs for cairo
        and splash availability.

        * poppler/CairoFontEngine.cc: Disable hinting.

        * glib/poppler-page.cc (poppler_page_render_to_pixbuf): Choose
        either splash or cairo rendering, based on configure choice.
        (cairo_render_to_pixbuf): New function to render using the cairo
        backend.
        (splash_render_to_pixbuf): Split out the splash code to this
        function.


Index: CairoFontEngine.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoFontEngine.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CairoFontEngine.cc	11 Mar 2005 16:42:20 -0000	1.2
+++ CairoFontEngine.cc	5 Apr 2005 17:46:44 -0000	1.3
@@ -252,7 +252,7 @@
 
 cairo_font_t *
 CairoFont::getFont(cairo_matrix_t *font_scale) {
-    return cairo_ft_font_create_for_ft_face (face, FT_LOAD_DEFAULT, font_scale);
+    return cairo_ft_font_create_for_ft_face (face, FT_LOAD_NO_HINTING, font_scale);
 }
 
 unsigned long

Index: CairoOutputDevImage.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDevImage.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- CairoOutputDevImage.cc	3 Mar 2005 19:46:01 -0000	1.1.1.1
+++ CairoOutputDevImage.cc	5 Apr 2005 17:46:44 -0000	1.2
@@ -64,24 +64,18 @@
 }
 
 
-SplashBitmap *CairoOutputDevImage::getBitmap() {
+void CairoOutputDevImage::getBitmap(unsigned char **data,
+				    int *width, int *height,
+				    int *rowstride) {
   SplashBitmap *bitmap;
   int w, h;
   unsigned char *src;
   unsigned int *dest;
 
-  bitmap = new SplashBitmap (pixels_w, pixels_h, splashModeRGB8);
-
-  for (h = 0; h < pixels_h; h++) {
-    src = pixels + 4*pixels_w * h;
-    dest = (unsigned int *)
-      ((unsigned char *)bitmap->getDataPtr().rgb8 + bitmap->getRowSize()*h);
-    for (w = 0; w < pixels_w; w++) {
-      *dest++ = splashMakeRGB8 (src[2], src[1], src[0]);
-      src += 4;
-    }
-  }
-  return bitmap;
+  *data = pixels;
+  *width = pixels_w;
+  *height = pixels_h;
+  *rowstride = 4 * pixels_w;
 }
 
 

Index: CairoOutputDevImage.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/CairoOutputDevImage.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- CairoOutputDevImage.h	3 Mar 2005 19:46:00 -0000	1.1.1.1
+++ CairoOutputDevImage.h	5 Apr 2005 17:46:44 -0000	1.2
@@ -33,7 +33,8 @@
 
   virtual void createCairo(GfxState *state);
 
-  SplashBitmap *getBitmap();
+  void getBitmap(unsigned char **data,
+		 int *width, int *height, int *rowstride);
   
 private:
   unsigned char *pixels;



More information about the poppler mailing list