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>
* poppler/Stream.h:
* poppler/OutputDev.h: Comment some unused parameters to calm down
......
......@@ -116,8 +116,10 @@ poppler_document_new_from_file (const char *uri,
document->output_dev = new CairoOutputDev ();
#elif defined (HAVE_SPLASH)
SplashColor white;
white.rgb8 = splashMakeRGB8 (0xff, 0xff, 0xff);
document->output_dev = new SplashOutputDev(splashModeRGB8, gFalse, white);
white[0] = 255;
white[1] = 255;
white[2] = 255;
document->output_dev = new SplashOutputDev(splashModeRGB8, 4, gFalse, white);
#endif
document->output_dev->startDoc(document->doc->getXRef ());
......
......@@ -246,23 +246,22 @@ poppler_page_copy_to_pixbuf(PopplerPage *page,
if (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++)
{
dst = pixbuf_data + y * pixbuf_rowstride;
for (x = 0; x < splash_width; x++)
{
SplashRGB8 *src;
src = (SplashRGB8 *) (color_ptr.rgb8p + y * splash_rowstride);
dst = pixbuf_data + y * pixbuf_rowstride;
for (x = 0; x < splash_width; x++)
{
dst[0] = splashRGB8R(*src);
dst[1] = splashRGB8G(*src);
dst[2] = splashRGB8B(*src);
if (pixbuf_n_channels == 4)
dst[3] = 0xff;
dst += pixbuf_n_channels;
src++;
}
output_dev->getBitmap()->getPixel(x, y, pixel);
dst[0] = pixel[0];
dst[1] = pixel[1];
dst[2] = pixel[2];
if (pixbuf_n_channels == 4)
dst[3] = 0xff;
dst += pixbuf_n_channels;
}
}
delete pixel;
}
#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