* resolution to a value R' > R, the page size in pixels will get multiplied * by R'/R, and will thereby exceed the representable range, causing a * limitcheck. That is why the bbox device must set the resolution to a * value larger than that of any real device. A consequence of this is that * the page size in inches is limited to the maximum representable pixel * size divided by R, which gives a limit of about 120" in each dimension. */ #define MAX_COORD (max_int_in_fixed - 1000) #define MAX_RESOLUTION 4000 gx_device_bbox gs_bbox_device = { /* * Define the device as 8-bit gray scale to avoid computing halftones. */ std_device_dci_body(gx_device_bbox, 0, "bbox", MAX_COORD, MAX_COORD, MAX_RESOLUTION, MAX_RESOLUTION, 1, 8, 255, 0, 256, 1), {bbox_open_device, gx_upright_get_initial_matrix, NULL, /* sync_output */ bbox_output_page, bbox_close_device, gx_default_gray_map_rgb_color, gx_default_gray_map_color_rgb, bbox_fill_rectangle, NULL, /* tile_rectangle */ bbox_copy_mono, bbox_copy_color, NULL, /* draw_line */ NULL, /* get_bits */ bbox_get_params,
static dev_proc_draw_thin_line(txtwrite_draw_thin_line); static dev_proc_strip_tile_rectangle(txtwrite_strip_tile_rectangle); static dev_proc_strip_copy_rop(txtwrite_strip_copy_rop); static dev_proc_begin_typed_image(txtwrite_begin_typed_image); static dev_proc_text_begin(txtwrite_text_begin); /* The device prototype */ #define X_DPI 720 #define Y_DPI 720 const gx_device_txtwrite_t gs_txtwrite_device = { /* Define the device as 8-bit gray scale to avoid computing halftones. */ std_device_dci_body(gx_device_txtwrite_t, 0, "txtwrite", DEFAULT_WIDTH_10THS * X_DPI / 10, DEFAULT_HEIGHT_10THS * Y_DPI / 10, X_DPI, Y_DPI, 1, 8, 255, 0, 256, 1), {txtwrite_open_device, gx_upright_get_initial_matrix, gx_default_sync_output, txtwrite_output_page, gx_default_close_device, gx_default_gray_map_rgb_color, gx_default_gray_map_color_rgb, txtwrite_fill_rectangle, gx_default_tile_rectangle, txtwrite_copy_mono, txtwrite_copy_color, gx_default_draw_line, gx_default_get_bits,