Commit 429d3521 authored by Albert Astals Cid's avatar Albert Astals Cid

Make it compile using --disable-cairo-output

parent b96c118e
2005-11-04 Albert Astals Cid <aacid@kde.org>
* glib/poppler-document.cc:
* glib/poppler-page.cc: Make it compile using --disable-cairo-output
2005-11-01 Albert Astals Cid <aacid@kde.org> 2005-11-01 Albert Astals Cid <aacid@kde.org>
* poppler/Stream.h: * poppler/Stream.h:
* poppler/OutputDev.h: Comment some unused parameters to calm down * poppler/OutputDev.h: Comment some unused parameters to calm down
......
...@@ -116,8 +116,10 @@ poppler_document_new_from_file (const char *uri, ...@@ -116,8 +116,10 @@ poppler_document_new_from_file (const char *uri,
document->output_dev = new CairoOutputDev (); document->output_dev = new CairoOutputDev ();
#elif defined (HAVE_SPLASH) #elif defined (HAVE_SPLASH)
SplashColor white; SplashColor white;
white.rgb8 = splashMakeRGB8 (0xff, 0xff, 0xff); white[0] = 255;
document->output_dev = new SplashOutputDev(splashModeRGB8, gFalse, white); white[1] = 255;
white[2] = 255;
document->output_dev = new SplashOutputDev(splashModeRGB8, 4, gFalse, white);
#endif #endif
document->output_dev->startDoc(document->doc->getXRef ()); document->output_dev->startDoc(document->doc->getXRef ());
......
...@@ -246,23 +246,22 @@ poppler_page_copy_to_pixbuf(PopplerPage *page, ...@@ -246,23 +246,22 @@ poppler_page_copy_to_pixbuf(PopplerPage *page,
if (splash_height > gdk_pixbuf_get_height (pixbuf)) if (splash_height > gdk_pixbuf_get_height (pixbuf))
splash_height = gdk_pixbuf_get_height (pixbuf); splash_height = gdk_pixbuf_get_height (pixbuf);
SplashColorPtr pixel = new Guchar[4];
for (y = 0; y < splash_height; y++) for (y = 0; y < splash_height; y++)
{
dst = pixbuf_data + y * pixbuf_rowstride;
for (x = 0; x < splash_width; x++)
{ {
SplashRGB8 *src; output_dev->getBitmap()->getPixel(x, y, pixel);
dst[0] = pixel[0];
src = (SplashRGB8 *) (color_ptr.rgb8p + y * splash_rowstride); dst[1] = pixel[1];
dst = pixbuf_data + y * pixbuf_rowstride; dst[2] = pixel[2];
for (x = 0; x < splash_width; x++) if (pixbuf_n_channels == 4)
{ dst[3] = 0xff;
dst[0] = splashRGB8R(*src); dst += pixbuf_n_channels;
dst[1] = splashRGB8G(*src);
dst[2] = splashRGB8B(*src);
if (pixbuf_n_channels == 4)
dst[3] = 0xff;
dst += pixbuf_n_channels;
src++;
}
} }
}
delete pixel;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment