Data Structures | |
struct | hpgs_reader_poly_point_st |
A point in hte HPGL polygon buffer. More... | |
struct | hpgs_reader_pcl_palette_st |
A PCL palette as used by PCL push/pop palette. More... | |
struct | hpgs_reader_pcl_bitmap_font_st |
A PCL bitmap font. More... | |
struct | hpgs_reader_pcl_bitmap_character_st |
A PCL bitmap character. More... | |
struct | hpgs_reader_st |
A HPGL interpreter. More... | |
Typedefs | |
typedef struct hpgs_reader_st | hpgs_reader |
typedef struct hpgs_reader_poly_point_st | hpgs_reader_poly_point |
typedef struct hpgs_reader_pcl_palette_st | hpgs_reader_pcl_palette |
typedef struct hpgs_reader_pcl_bitmap_font_st | hpgs_reader_pcl_bitmap_font |
typedef struct hpgs_reader_pcl_bitmap_character_st | hpgs_reader_pcl_bitmap_character |
typedef int(* | hpgs_reader_hpglcmd_func_t )(hpgs_reader *reader) |
Functions | |
HPGS_API hpgs_reader * | hpgs_new_reader (hpgs_istream *in, hpgs_device *dev, hpgs_bool multipage, int v) |
HPGS_API void | hpgs_reader_set_lw_factor (hpgs_reader *reader, double lw_factor) |
HPGS_API void | hpgs_reader_set_fixed_page (hpgs_reader *reader, hpgs_bbox *bbox, double page_width, double page_height, double border, double angle) |
HPGS_API void | hpgs_reader_set_dynamic_page (hpgs_reader *reader, hpgs_bbox *bbox, double max_page_width, double max_page_height, double border, double angle) |
HPGS_API void | hpgs_reader_set_page_asset_func (hpgs_reader *reader, void *ctxt, hpgs_reader_asset_func_t func) |
HPGS_API void | hpgs_reader_set_frame_asset_func (hpgs_reader *reader, void *ctxt, hpgs_reader_asset_func_t func) |
HPGS_API void | hpgs_reader_interrupt (hpgs_reader *reader) |
HPGS_API int | hpgs_reader_get_current_pen (hpgs_reader *reader) |
HPGS_API int | hpgs_reader_imbue (hpgs_reader *reader, hpgs_device *dev) |
HPGS_API int | hpgs_reader_attach (hpgs_reader *reader, hpgs_istream *in) |
HPGS_API int | hpgs_reader_stamp (hpgs_reader *reader, const hpgs_bbox *bb, const char *stamp, const char *encoding, double stamp_size) |
HPGS_API int | hpgs_device_stamp (hpgs_device *dev, const hpgs_bbox *bb, const char *stamp, const char *encoding, double stamp_size) |
HPGS_API int | hpgs_reader_set_png_dump (hpgs_reader *reader, const char *filename) |
HPGS_API int | hpgs_read (hpgs_reader *reader, hpgs_bool finish) |
HPGS_API void | hpgs_destroy_reader (hpgs_reader *reader) |
HPGS_INTERNAL_API void | hpgs_reader_pcl_bitmap_font_destroy (hpgs_reader_pcl_bitmap_font *font) |
HPGS_INTERNAL_API void | hpgs_reader_pcl_bitmap_character_destroy (hpgs_reader_pcl_bitmap_character *character) |
HPGS_INTERNAL_API int | hpgs_reader_pcl_bitmap_character_render (hpgs_reader *reader, const hpgs_reader_pcl_bitmap_font *font, int charcode) |
HPGS_INTERNAL_API int | hpgs_reader_check_param_end (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_read_pcl_int (hpgs_reader *reader, int *x, int *sign) |
HPGS_INTERNAL_API int | hpgs_reader_read_int (hpgs_reader *reader, int *x) |
HPGS_INTERNAL_API int | hpgs_reader_read_double (hpgs_reader *reader, double *x) |
HPGS_INTERNAL_API int | hpgs_reader_read_point (hpgs_reader *reader, hpgs_point *p, int xform) |
HPGS_INTERNAL_API int | hpgs_reader_read_new_string (hpgs_reader *reader, char *str) |
HPGS_INTERNAL_API int | hpgs_reader_read_label_string (hpgs_reader *reader, char *str) |
HPGS_INTERNAL_API void | hpgs_reader_set_page_matrix (hpgs_reader *reader, const hpgs_bbox *bb) |
HPGS_INTERNAL_API void | hpgs_reader_set_default_transformation (hpgs_reader *reader) |
HPGS_INTERNAL_API void | hpgs_reader_set_default_state (hpgs_reader *reader) |
HPGS_INTERNAL_API void | hpgs_reader_set_defaults (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_set_plotsize (hpgs_reader *reader, double xs, double ys) |
HPGS_INTERNAL_API int | hpgs_reader_showpage (hpgs_reader *reader, int ipage) |
HPGS_INTERNAL_API void | hpgs_reader_set_std_pen_colors (hpgs_reader *reader, int i0, int n) |
HPGS_INTERNAL_API int | hpgs_reader_checkpath (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_moveto (hpgs_reader *reader, hpgs_point *p) |
HPGS_INTERNAL_API int | hpgs_reader_lineto (hpgs_reader *reader, hpgs_point *p) |
HPGS_INTERNAL_API int | hpgs_reader_curveto (hpgs_reader *reader, hpgs_point *p1, hpgs_point *p2, hpgs_point *p3) |
HPGS_INTERNAL_API int | hpgs_reader_stroke (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_fill (hpgs_reader *reader, hpgs_bool winding) |
HPGS_INTERNAL_API int | hpgs_reader_closepath (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_setpen (hpgs_reader *reader, int pen) |
HPGS_INTERNAL_API int | hpgs_device_setrgb_all (hpgs_device *dev, const hpgs_color *rgb) |
HPGS_INTERNAL_API int | hpgs_reader_label (hpgs_reader *reader, const char *str, int str_len, int face, int encoding, int posture, int weight, const hpgs_point *left_vec, const hpgs_point *up_vec, const hpgs_point *space_vec) |
HPGS_INTERNAL_API int | hpgs_device_label (hpgs_device *dev, hpgs_point *pos, const char *str, int str_len, int face, const char *encoding, int posture, int weight, const hpgs_point *left_vec, const hpgs_point *up_vec, const hpgs_point *space_vec) |
HPGS_INTERNAL_API int | hpgs_reader_do_PCL (hpgs_reader *reader, hpgs_bool take_pos) |
HPGS_INTERNAL_API int | hpgs_reader_do_PJL (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_push_pcl_palette (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_pop_pcl_palette (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_pcl_cmd_font_id (hpgs_reader *reader, int arg) |
HPGS_INTERNAL_API int | hpgs_reader_pcl_cmd_font_header (hpgs_reader *reader, int arg) |
HPGS_INTERNAL_API int | hpgs_reader_pcl_cmd_select_font_id (hpgs_reader *reader, int arg) |
HPGS_INTERNAL_API int | hpgs_reader_pcl_cmd_character_definition (hpgs_reader *reader, int arg) |
HPGS_INTERNAL_API int | hpgs_reader_do_AA (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_AC (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_AD (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_AR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_AT (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_BP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_BR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_BZ (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_CI (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_CO (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_CP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_CR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_DI (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_DR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_DT (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_DV (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_EA (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_EP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_ER (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_ES (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_EW (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_FP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_FR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_FT (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_IN (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_IP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_IR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_IW (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_LA (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_LB (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_LO (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_LT (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_MC (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_MG (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_NP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PC (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PA (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PD (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PE (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PG (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PM (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PS (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PU (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_PW (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_RA (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_RO (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_RR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_RT (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SA (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SC (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SD (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SI (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SL (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SM (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SP (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_SS (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_TR (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_UL (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_WG (hpgs_reader *reader) |
HPGS_INTERNAL_API int | hpgs_reader_do_WU (hpgs_reader *reader) |
HPGS_API void hpgs_destroy_reader | ( | hpgs_reader * | reader | ) |
Destroys the given reader
structure and frees all allocated resources of the HPGL reader.
References hpgs_reader_st::device, hpgs_device_destroy(), hpgs_image_destroy(), hpgs_istream_close(), hpgs_reader_st::in, hpgs_reader_st::pcl_bitmap_fonts, hpgs_reader_st::pcl_bitmap_fonts_size, hpgs_reader_st::pcl_i_palette, hpgs_reader_st::pcl_image, hpgs_reader_st::pcl_palettes, hpgs_reader_st::pcl_raster_data, hpgs_reader_st::plotsize_device, hpgs_reader_st::png_dump_filename, and hpgs_reader_st::poly_buffer.
HPGS_INTERNAL_API int hpgs_device_setrgb_all | ( | hpgs_device * | dev, | |
const hpgs_color * | rgb | |||
) |
Simultaneously set the promary and the pattern color on a device.
References hpgs_setpatcol(), and hpgs_setrgbcolor().
Referenced by hpgs_device_stamp().
HPGS_API int hpgs_device_stamp | ( | hpgs_device * | dev, | |
const hpgs_bbox * | bb, | |||
const char * | stamp, | |||
const char * | encoding, | |||
double | stamp_size | |||
) |
This is a highlevel interface to stamp the device with a text prior to printing any data. This is used in order to print a 'draft' or 'obsoleted' mark to the paper.
If encodeing is a null pointer
References hpgs_device_setrgb_all(), and hpgs_utf8_strlen().
Referenced by hpgs_reader_stamp().
HPGS_API hpgs_reader* hpgs_new_reader | ( | hpgs_istream * | in, | |
hpgs_device * | dev, | |||
hpgs_bool | multipage, | |||
int | v | |||
) |
Contructs a HPGL reader on the heap using the given input device in
and the given output vector drawing device dev
.
The argument multipage
specifies, whether the reader processes more than one page.
The argument v
specifies the verbosity of the HPGL reader. A value of 0 forces the reader to not report anything to hpgs_log()
. Value of 1 or 2 give diagnostics output to hpgs_log()
with increasing volume.
You do not have to call neither hpgs_close
on in
nor hpgs_destroy
on dev
.
In the case of an error, a null pointer is returned. This only happens, if the system is out of memory.
References hpgs_reader_st::content_bbox, hpgs_reader_st::current_page, hpgs_reader_st::device, hpgs_reader_st::frame_asset_ctxt, hpgs_reader_st::frame_asset_func, hpgs_device_destroy(), hpgs_istream_close(), hpgs_matrix_set_identity(), hpgs_reader_st::in, hpgs_reader_st::interrupted, hpgs_reader_st::lw_factor, hpgs_reader_st::page_angle, hpgs_reader_st::page_asset_ctxt, hpgs_reader_st::page_asset_func, hpgs_reader_st::page_bbox, hpgs_reader_st::page_border, hpgs_reader_st::page_height, hpgs_reader_st::page_matrix, hpgs_reader_st::page_mode, hpgs_reader_st::page_scale, hpgs_reader_st::page_width, hpgs_reader_st::pcl_bitmap_fonts, hpgs_reader_st::pcl_bitmap_fonts_alloc_size, hpgs_reader_st::pcl_bitmap_fonts_size, hpgs_reader_st::pcl_current_bitmap_font, hpgs_reader_st::pcl_i_palette, hpgs_reader_st::pcl_image, hpgs_reader_st::pcl_n_palettes, hpgs_reader_st::pcl_palettes, hpgs_reader_st::pcl_primary_bitmap_font, hpgs_reader_st::pcl_raster_data, hpgs_reader_st::plotsize_device, hpgs_reader_st::png_dump_count, hpgs_reader_st::png_dump_filename, hpgs_reader_st::poly_buffer, and hpgs_reader_st::verbosity.
HPGS_API int hpgs_read | ( | hpgs_reader * | reader, | |
hpgs_bool | finish | |||
) |
Interprets the input stream associated with reader
and passes the result to the associated vector device.
The argument finish
specifies, whether this is the last file written to the underlying hpgs_device
. If finish
is HPGS_TRUE
, hpgs_device_finish
is called. Otherwise, another input stream may be attached using hpgs_reader_attach
and hpgs_read
may be called again. This way, multiple input files may collated together in a single output file.
The function return 0 upon success. A value of -1 is returned, when an error is encountered.
You have to call hpgs_reader_get_error
in order to retrieve the error message in the latter case.
References hpgs_reader_st::bytes_ignored, hpgs_reader_st::clipsave_depth, hpgs_reader_st::current_page, hpgs_reader_st::device, hpgs_reader_st::eoc, hpgs_clear_error(), hpgs_cliprestore(), HPGS_DEVICE_CAP_MULTISIZE, hpgs_device_capabilities(), hpgs_device_finish(), hpgs_error_ctxt(), hpgs_getc(), hpgs_getplotsize(), hpgs_have_error(), hpgs_istream_iseof(), hpgs_istream_iserror(), hpgs_istream_seek(), hpgs_istream_tell(), hpgs_log(), hpgs_reader_read_double(), hpgs_set_error(), hpgs_setplotsize(), hpgs_ungetc(), hpgs_reader_st::in, hpgs_reader_st::interrupted, hpgs_reader_st::last_byte, hpgs_reader_st::page_bbox, hpgs_reader_st::plotsize_device, and hpgs_reader_st::verbosity.
HPGS_API int hpgs_reader_attach | ( | hpgs_reader * | reader, | |
hpgs_istream * | in | |||
) |
Attach a new input stream to a HPGL reader. This is useful in multipage mode in order to collate multiple input files.
The function return 0 in any case.
References hpgs_istream_close(), and hpgs_reader_st::in.
HPGS_INTERNAL_API int hpgs_reader_do_PCL | ( | hpgs_reader * | reader, | |
hpgs_bool | take_pos | |||
) |
Read a PCL block of the file.
Return values:
References hpgs_reader_st::bytes_ignored, hpgs_reader_pcl_bitmap_font_st::characters, hpgs_reader_st::current_point, hpgs_reader_st::eoc, hpgs_error_ctxt(), hpgs_getc(), hpgs_log(), hpgs_matrix_ixform(), hpgs_reader_read_pcl_int(), hpgs_ungetc(), hpgs_reader_st::in, hpgs_reader_st::interrupted, hpgs_reader_st::last_byte, hpgs_reader_st::page_matrix, hpgs_reader_st::pcl_image, hpgs_reader_st::pcl_point, and hpgs_reader_st::pcl_primary_bitmap_font.
HPGS_INTERNAL_API int hpgs_reader_do_PJL | ( | hpgs_reader * | reader | ) |
Read a PJL block of the file.
Return values:
References hpgs_reader_st::bytes_ignored, hpgs_reader_st::eoc, hpgs_getc(), hpgs_istream_seek(), hpgs_istream_tell(), hpgs_log(), hpgs_reader_read_pcl_int(), hpgs_set_error(), hpgs_ungetc(), hpgs_reader_st::in, hpgs_reader_st::last_byte, hpgs_reader_st::pcl_raster_res, hpgs_reader_st::pcl_scale, and hpgs_reader_st::verbosity.
HPGS_API int hpgs_reader_get_current_pen | ( | hpgs_reader * | reader | ) |
Returns the curent HPGL pen of the given reader
structure. This information might be used by page or frame asset functions.
References hpgs_reader_st::current_pen.
HPGS_API int hpgs_reader_imbue | ( | hpgs_reader * | reader, | |
hpgs_device * | dev | |||
) |
Sets a vector drawing device to a HPGL reader an resets the input stream.
The function return 0 in any case.
References hpgs_reader_st::current_page, hpgs_reader_st::device, HPGS_DEVICE_CAP_PLOTSIZE, hpgs_device_capabilities(), hpgs_device_destroy(), hpgs_istream_seek(), hpgs_reader_st::in, and hpgs_reader_st::plotsize_device.
HPGS_API void hpgs_reader_interrupt | ( | hpgs_reader * | reader | ) |
Interrupt a currently running call to hpgs_reader_read
from another thread. There's no guarantee when hpgs_read
will terminate after calling hpgs_reader_interrupt
. If the reader is currently performing a time-consuming task like rendering a large imge to the device, hpgs_read
may continue for several seconds after this call.
References hpgs_reader_st::interrupted.
HPGS_INTERNAL_API int hpgs_reader_read_double | ( | hpgs_reader * | reader, | |
double * | x | |||
) |
read a double argument from the stream. return values:
References hpgs_reader_st::eoc, hpgs_getc(), hpgs_ungetc(), hpgs_reader_st::in, and hpgs_reader_st::last_byte.
Referenced by hpgs_read().
HPGS_INTERNAL_API int hpgs_reader_read_int | ( | hpgs_reader * | reader, | |
int * | x | |||
) |
read an integer argument from the stream . return values:
References hpgs_reader_st::eoc, hpgs_getc(), hpgs_ungetc(), hpgs_reader_st::in, and hpgs_reader_st::last_byte.
HPGS_INTERNAL_API int hpgs_reader_read_new_string | ( | hpgs_reader * | reader, | |
char * | str | |||
) |
read a new string argument from the stream return values:
References hpgs_reader_st::eoc, hpgs_getc(), hpgs_reader_st::in, and hpgs_reader_st::last_byte.
HPGS_INTERNAL_API int hpgs_reader_read_pcl_int | ( | hpgs_reader * | reader, | |
int * | x, | |||
int * | sign | |||
) |
read an integer argument from the stream - PCL version. return values:
References hpgs_getc(), hpgs_ungetc(), hpgs_reader_st::in, and hpgs_reader_st::last_byte.
Referenced by hpgs_reader_do_PCL(), and hpgs_reader_do_PJL().
HPGS_API void hpgs_reader_set_dynamic_page | ( | hpgs_reader * | reader, | |
hpgs_bbox * | bbox, | |||
double | max_page_width, | |||
double | max_page_height, | |||
double | border, | |||
double | angle | |||
) |
Force the placement of the content on a dynamically sized page. Call this subroutine after you determined the plot size using a plotsize device.
max_page_width
and max_page_height
specifiy the maximal dimension of the page, which will be adjusted to the size of the HPGL content of each individual page. border
specifies the border from the page to the HPGL content.
bbox
holds the bounding box of the HPGL content of the first page on input and on output, the bounding box of the whole page is returned. The returned bounding box should be used to set up your device, which will be passed to hpgs_reader_imbue
after issuing this call.
References hpgs_reader_st::page_angle, hpgs_reader_st::page_bbox, hpgs_reader_st::page_border, hpgs_reader_st::page_height, hpgs_reader_st::page_mode, and hpgs_reader_st::page_width.
HPGS_API void hpgs_reader_set_fixed_page | ( | hpgs_reader * | reader, | |
hpgs_bbox * | bbox, | |||
double | page_width, | |||
double | page_height, | |||
double | border, | |||
double | angle | |||
) |
Force the placement of the content on a fixed page. Call this subroutine after you determined the plot size using a plotsize device.
page_width
and page_height
specifiy the dimension of the page in point (1/72 inch). border
specifies the border from the page to the HPGL content.
bbox
holds the bounding box of the HPGL content of the first page on input and on output, the bounding box of the whole page is returned. The returned bounding box should be used to set up your device, which will be passed to hpgs_reader_imbue
after issuing this call.
References hpgs_reader_st::page_angle, hpgs_reader_st::page_bbox, hpgs_reader_st::page_border, hpgs_reader_st::page_height, hpgs_reader_st::page_mode, and hpgs_reader_st::page_width.
HPGS_API void hpgs_reader_set_frame_asset_func | ( | hpgs_reader * | reader, | |
void * | ctxt, | |||
hpgs_reader_asset_func_t | func | |||
) |
Sets a callback function, which allows to render additional frame assets before a HPGL FR command becomes effective or the reader calls hpgs_showpage
.
The call back function is passed the given ctxt
pointer, the device on which the reader operates, the bounding box of the HPGL content and the transformation matrix from HPGL coordinates to page coordinates.
References hpgs_reader_st::frame_asset_ctxt, and hpgs_reader_st::frame_asset_func.
HPGS_API void hpgs_reader_set_lw_factor | ( | hpgs_reader * | reader, | |
double | lw_factor | |||
) |
Set the factor lw_factor
for scaling HPGL linewidths to output linewidths. Usually you set this factor to 1.0, although for rendering to pixel device with a low resolution a factor of 0.5 may be useful to enforce the creation of thin lines.
References hpgs_reader_st::lw_factor.
HPGS_API void hpgs_reader_set_page_asset_func | ( | hpgs_reader * | reader, | |
void * | ctxt, | |||
hpgs_reader_asset_func_t | func | |||
) |
Sets a callback function, which allows to render additional page assets before the reader calls hpgs_showpage
.
The call back function is passed the given ctxt
pointer, the device on which the reader operates, the bounding box of the HPGL content and the transformation matrix from HPGL coordinates to page coordinates.
References hpgs_reader_st::page_asset_ctxt, and hpgs_reader_st::page_asset_func.
HPGS_API int hpgs_reader_set_png_dump | ( | hpgs_reader * | reader, | |
const char * | filename | |||
) |
Sets a filename for dumping inline PCL images in PNG format. The actual filenames written are:" filename0001.png, filename0002.png, ..... If filename
contains an extension .png the counter is put between the basename and the .png extension.
References hpgs_set_error(), hpgs_reader_st::png_dump_count, and hpgs_reader_st::png_dump_filename.
HPGS_API int hpgs_reader_stamp | ( | hpgs_reader * | reader, | |
const hpgs_bbox * | bb, | |||
const char * | stamp, | |||
const char * | encoding, | |||
double | stamp_size | |||
) |
This call is deprecated, use hpgs_device_stamp
instead.
References hpgs_reader_st::device, and hpgs_device_stamp().