*** master/550/gs5.50/gdevpdfi.c Mon Aug 31 15:04:41 1998 --- src/gdevpdfi.c Sun Dec 20 11:23:36 1998 *************** *** 572,581 **** /* Copy a monochrome bitmap or mask. */ ! int ! gdev_pdf_copy_mono(gx_device * dev, ! const byte * base, int sourcex, int raster, gx_bitmap_id id, ! int x, int y, int w, int h, gx_color_index zero, gx_color_index one) { - gx_device_pdf *pdev = (gx_device_pdf *) dev; int code; gs_color_space cs; --- 572,581 ---- /* Copy a monochrome bitmap or mask. */ ! private int ! pdf_copy_mono(gx_device_pdf *pdev, ! const byte *base, int sourcex, int raster, gx_bitmap_id id, ! int x, int y, int w, int h, gx_color_index zero, ! gx_color_index one, const gx_clip_path *pcpath) { int code; gs_color_space cs; *************** *** 588,599 **** byte invert = 0; ! if (w <= 0 || h <= 0) ! return 0; ! /* Make sure we aren't being clipped. */ ! if (pdf_must_put_clip_path(pdev, NULL)) { code = pdf_open_page(pdev, pdf_in_stream); if (code < 0) return code; ! pdf_put_clip_path(pdev, NULL); } /* We have 3 cases: mask, inverse mask, and solid. */ --- 588,597 ---- byte invert = 0; ! /* Update clipping. */ ! if (pdf_must_put_clip_path(pdev, pcpath)) { code = pdf_open_page(pdev, pdf_in_stream); if (code < 0) return code; ! pdf_put_clip_path(pdev, pcpath); } /* We have 3 cases: mask, inverse mask, and solid. */ *************** *** 755,758 **** --- 753,769 ---- } } + int + gdev_pdf_copy_mono(gx_device * dev, + const byte * base, int sourcex, int raster, gx_bitmap_id id, + int x, int y, int w, int h, gx_color_index zero, + gx_color_index one) + { + gx_device_pdf *pdev = (gx_device_pdf *) dev; + + if (w <= 0 || h <= 0) + return 0; + return pdf_copy_mono(pdev, base, sourcex, raster, id, x, y, w, h, + zero, one, NULL); + } /* Copy a color bitmap. */ *************** *** 826,830 **** { gx_device_pdf *pdev = (gx_device_pdf *) dev; - int code; if (width <= 0 || height <= 0) --- 839,842 ---- *************** *** 834,847 **** x, y, width, height, pdcolor, depth, lop, pcpath); ! if (pdf_must_put_clip_path(pdev, pcpath)) { ! code = pdf_open_page(pdev, pdf_in_stream); ! if (code < 0) ! return code; ! pdf_put_clip_path(pdev, pcpath); ! } ! return gdev_pdf_copy_mono(dev, data, data_x, raster, id, ! x, y, width, height, ! gx_no_color_index, ! gx_dc_pure_color(pdcolor)); } --- 846,852 ---- x, y, width, height, pdcolor, depth, lop, pcpath); ! return pdf_copy_mono(pdev, data, data_x, raster, id, x, y, width, height, ! gx_no_color_index, gx_dc_pure_color(pdcolor), ! pcpath); }