Ejemplo n.º 1
0
static dev_proc_close_device(ljet5_close);
static dev_proc_print_page(ljet5_print_page);

static const gx_device_procs ljet5_procs =
prn_procs(ljet5_open, gdev_prn_output_page, ljet5_close);

const gx_device_printer gs_lj5mono_device =
prn_device(ljet5_procs, "lj5mono",
	   DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
	   X_DPI, Y_DPI,
	   0, 0, 0, 0,
	   1, ljet5_print_page);

static const gx_device_procs lj5gray_procs =
prn_color_procs(ljet5_open, gdev_prn_output_page, ljet5_close,
		gx_default_gray_map_rgb_color,
		gx_default_gray_map_color_rgb);

const gx_device_printer gs_lj5gray_device = {
    prn_device_body(gx_device_printer, lj5gray_procs, "lj5gray",
		    DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
		    X_DPI, Y_DPI,
		    0, 0, 0, 0,
		    1, 8, 255, 0, 256, 1, ljet5_print_page)
};

/* Open the printer, writing the stream header. */
static int
ljet5_open(gx_device * pdev)
{
    int code = gdev_prn_open(pdev);
Ejemplo n.º 2
0
static dev_proc_print_page(bmp_cmyk_print_page);

/* Monochrome. */

const gx_device_printer gs_bmpmono_device =
prn_device(prn_std_procs, "bmpmono",
	   DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
	   X_DPI, Y_DPI,
	   0, 0, 0, 0,		/* margins */
	   1, bmp_print_page);

/* 8-bit (SuperVGA-style) grayscale . */
/* (Uses a fixed palette of 256 gray levels.) */

static const gx_device_procs bmpgray_procs =
prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
		gx_default_gray_map_rgb_color, gx_default_gray_map_color_rgb);
const gx_device_printer gs_bmpgray_device = {
  prn_device_body(gx_device_printer, bmpgray_procs, "bmpgray",
	   DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
	   X_DPI, Y_DPI,
	   0, 0, 0, 0,		/* margins */
	   1, 8, 255, 0, 256, 0, bmp_print_page)
};

/* 1-bit-per-plane separated CMYK color. */

#define bmp_cmyk_procs(p_map_color_rgb, p_map_cmyk_color)\
    gdev_prn_open, NULL, NULL, gdev_prn_output_page, gdev_prn_close,\
    NULL, p_map_color_rgb, NULL, NULL, NULL, NULL, NULL, NULL,\
    gdev_prn_get_params, gdev_prn_put_params,\
    p_map_cmyk_color, NULL, NULL, NULL, gx_page_device_get_page_device
Ejemplo n.º 3
0
   adding new device descriptors with other geometrical characteristics.
 */
#include "gdevprn.h"
#include "malloc_.h"

/* Thanks to Karsten Spang ([email protected]) for contributing */
/* this code to Aladdin Enterprises. */

/* The device descriptor */
/* We need our own color mapping procedures. */
static dev_proc_map_rgb_color(tekink_map_rgb_color);
static dev_proc_map_color_rgb(tekink_map_color_rgb);
static dev_proc_print_page(tekink_print_page);
/* Since the print_page doesn't alter the device, this device can print in the background */
static gx_device_procs tekink_procs =
    prn_color_procs(gdev_prn_open, gdev_prn_bg_output_page, gdev_prn_close,
        tekink_map_rgb_color, tekink_map_color_rgb);

/*
   Device descriptor for the Tek 4696.
   The 4696 plotter uses roll media, thus the y size is arbitrary. The
   value below is chosen to make the image area A*-format like, i.e. the
   aspect ratio is close to sqrt(2).
*/
const gx_device_printer far_data gs_tek4696_device =
    prn_device(tekink_procs,"tek4696",
    85,120,	/* Page size in 10th of inches */
    120,120,	/* Resolution in DPI */
    0.0,0.0,0.0,0.0,	/* Margins */
    4,		/* Bits per pixel */
    tekink_print_page);
Ejemplo n.º 4
0
/* There are 60 pixel(RGB) in the right clipped margin */
#define FIRST_COLUMN    180

/* The value of X_DPI and Y_DPI is gained by experiment */
#define X_DPI 154		/* pixels per inch */
#define Y_DPI 187		/* pixels per inch */

/* The device descriptor */
static dev_proc_print_page(cp50_print_page);
static dev_proc_output_page(cp50_output_page);

static dev_proc_map_rgb_color(cp50_rgb_color);
static dev_proc_map_color_rgb(cp50_color_rgb);

static gx_device_procs cp50_procs =
  prn_color_procs(gdev_prn_open, cp50_output_page, gdev_prn_close,
    cp50_rgb_color, cp50_color_rgb);

typedef struct gx_device_printer_cp50
{
    gx_device_common;
    gx_prn_device_common;
    int copies;
} gx_device_printer_cp50;

const gx_device_printer_cp50 far_data gs_cp50_device =
{
  prn_device_std_body(gx_device_printer_cp50, cp50_procs, "cp50",
        39,				/* width_10ths, 100mm */
        59,				/* height_10ths,150mm  */
        X_DPI, Y_DPI,
        0.39, 0.91, 0.43, 0.75,		/* margins */
Ejemplo n.º 5
0
/* $Id$ */
/* MIFF file format driver */
#include "gdevprn.h"

/* ------ The device descriptor ------ */

/*
 * Default X and Y resolution.
 */
#define X_DPI 72
#define Y_DPI 72

static dev_proc_print_page(miff24_print_page);

static const gx_device_procs miff24_procs =
prn_color_procs(gdev_prn_open, gdev_prn_output_page, gdev_prn_close,
                gx_default_rgb_map_rgb_color, gx_default_rgb_map_color_rgb);
const gx_device_printer gs_miff24_device =
prn_device(miff24_procs, "miff24",
           DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
           X_DPI, Y_DPI,
           0, 0, 0, 0,		/* margins */
           24, miff24_print_page);

/* Print one page in 24-bit RLE direct color format. */
static int
miff24_print_page(gx_device_printer * pdev, FILE * file)
{
    int raster = gx_device_raster((gx_device *) pdev, true);
    byte *line = gs_alloc_bytes(pdev->memory, raster, "miff line buffer");
    int y;
    int code = 0;		/* return code */
Ejemplo n.º 6
0
#define RENDER_BUFFER_SPACE 500000

/* This device only supports SVGA 8-bit color. */

static dev_proc_open_device(pcx2up_open);
static dev_proc_print_page(pcx2up_print_page);

typedef struct gx_device_2up_s {
    gx_device_common;
    gx_prn_device_common;
    bool have_odd_page;
    gx_saved_page odd_page;
} gx_device_2up;

static const gx_device_procs pcx2up_procs =
prn_color_procs(pcx2up_open, gdev_prn_output_page, gdev_prn_close,
                pc_8bit_map_rgb_color, pc_8bit_map_color_rgb);
gx_device_2up gs_pcx2up_device =
{prn_device_body(gx_device_2up, pcx2up_procs, "pcx2up",
                 DEFAULT_WIDTH_10THS, DEFAULT_HEIGHT_10THS,
                 X_DPI, Y_DPI,
                 0, 0, 0, 0,	/* margins */
                 3, 8, 5, 5, 6, 6, pcx2up_print_page)
};

/* Open the device.  We reimplement this to force banding with */
/* delayed rasterizing. */
static int
pcx2up_open(gx_device * dev)
{
    gx_device_printer *pdev = (gx_device_printer *) dev;
    int code;