Write a PostScript file. More...
#include <vul_psfile.h>

Public Types | |
| enum | paper_type { US_NORMAL, A4, B5, A3, US_LEGAL, ELEVEN_BY_SEVENTEEN, FOUR_BY_FIVE, THIRTY_FIVE_mm } |
| enum | paper_orientation { PORTRAIT, LANDSCAPE } |
| enum | paper_layout { CENTER, MAX } |
Public Member Functions | |
| vul_psfile (char const *filename, bool debug_output=false) | |
| Default constructor. More... | |
| ~vul_psfile () override | |
| Destructor. More... | |
| operator bool () | |
| void | set_paper_type (vul_psfile::paper_type type) |
| void | set_paper_layout (vul_psfile::paper_layout layout) |
| void | set_paper_orientation (vul_psfile::paper_orientation o) |
| void | set_reduction_factor (int rf) |
| void | set_scale_x (float sx) |
| set the horizontal scaling (in percent); no scaling is 100. More... | |
| void | set_scale_y (float sy) |
| set the vertical scaling (in percent); no scaling is 100. More... | |
| void | set_fg_color (float r, float g, float b) |
| void | set_bg_color (float r, float g, float b) |
| void | set_line_width (float f_width) |
| float | line_width () const |
| void | print_greyscale_image (const unsigned char *data, int sizex, int sizey) |
| Write 8 bit grey scale image. More... | |
| void | print_color_image (const unsigned char *data, int sizex, int sizey) |
| Write 24 bit colour image. More... | |
| void | line (float x1, float y1, float x2, float y2) |
| Add a line between the given points to the Postscript file. More... | |
| void | point (float x, float y, float point_size=0) |
| Add a point at the given coordinates to the Postscript file. More... | |
| void | ellipse (float x, float y, float a_axis, float b_axis, int angle=0) |
| Add an ellipse to the Postscript file. More... | |
| void | circle (float x, float y, float radius) |
| Add a circle with the given centre point and radius to the Postscript file. More... | |
| void | reset_bounding_box () |
| Rewrite output bounding box parameters. More... | |
Protected Member Functions | |
| void | set_min_max_xy (float x, float y) |
| Set Bounding Box Min and Max x, y. More... | |
| void | set_min_max_xy (int x, int y) |
| Set Bounding Box Min and Max x, y. More... | |
| bool | set_parameters (int sizex, int sizey) |
| Set ox, oy , iw, ih, iwf, ihf parameters for PostScript file use. More... | |
| void | postscript_header () |
| PostScript file header. Automatically called by the constructor. More... | |
| void | graphic_header () |
| Set graphic coordinate (translate and rotate to local coordinate). More... | |
| void | sobj_rgb_params (char const *str, bool filled) |
| Utility program used in point(), line(), ellipse() and circle(). More... | |
| void | print_graphics_prolog () |
| the defined procedure for PostScript script use. More... | |
Private Member Functions | |
| void | compute_bounding_box () |
| Recalculate bounding box and scale x and y (if necessary). More... | |
| void | reset_postscript_header () |
| Reset PostScript header file. More... | |
| void | image_translate_and_scale () |
| Set Image translate and scale. More... | |
| void | object_translate_and_scale () |
| Set object translate and scale. More... | |
| void | done () |
Private Attributes | |
| std::ofstream | output_filestream |
| float | fg_r |
| float | fg_g |
| float | fg_b |
| float | bg_r |
| float | bg_g |
| float | bg_b |
| float | line_width_ |
| float | scale_x |
| float | scale_y |
| int | ox |
| int | oy |
| int | iw |
| int | ih |
| double | iwf |
| double | ihf |
| double | psizex |
| double | psizey |
| double | pos_inx |
| double | pos_iny |
| int | width |
| int | height |
| std::string | filename |
| paper_type | printer_paper_type |
| paper_orientation | printer_paper_orientation |
| paper_layout | printer_paper_layout |
| int | reduction_factor |
| bool | doneps |
| int | min_x |
| int | min_y |
| int | max_x |
| int | max_y |
| int | box_width |
| int | box_height |
| std::streampos | translate_pos |
| std::streampos | sobj_t_pos |
| std::streampos | header_pos |
| bool | graphics_prolog_exists |
| bool | exist_image |
| bool | exist_objs |
Write a PostScript file.
Definition at line 22 of file vul_psfile.h.
| Enumerator | |
|---|---|
| CENTER | |
| MAX | |
Definition at line 37 of file vul_psfile.h.
| Enumerator | |
|---|---|
| PORTRAIT | |
| LANDSCAPE | |
Definition at line 34 of file vul_psfile.h.
| Enumerator | |
|---|---|
| US_NORMAL | |
| A4 | |
| B5 | |
| A3 | |
| US_LEGAL | |
| ELEVEN_BY_SEVENTEEN | |
| FOUR_BY_FIVE | |
| THIRTY_FIVE_mm | |
Definition at line 25 of file vul_psfile.h.
| vul_psfile::vul_psfile | ( | char const * | filename, |
| bool | debug_output = false |
||
| ) |
Default constructor.
Definition at line 54 of file vul_psfile.cxx.
|
override |
Destructor.
Definition at line 88 of file vul_psfile.cxx.
| void vul_psfile::circle | ( | float | x, |
| float | y, | ||
| float | radius | ||
| ) |
Add a circle with the given centre point and radius to the Postscript file.
Definition at line 661 of file vul_psfile.cxx.
|
private |
Recalculate bounding box and scale x and y (if necessary).
Definition at line 125 of file vul_psfile.cxx.
|
private |
Definition at line 1021 of file vul_psfile.cxx.
| void vul_psfile::ellipse | ( | float | x, |
| float | y, | ||
| float | a_axis, | ||
| float | b_axis, | ||
| int | angle = 0 |
||
| ) |
Add an ellipse to the Postscript file.
Definition at line 635 of file vul_psfile.cxx.
|
protected |
Set graphic coordinate (translate and rotate to local coordinate).
Definition at line 485 of file vul_psfile.cxx.
|
private |
Set Image translate and scale.
Definition at line 500 of file vul_psfile.cxx.
| void vul_psfile::line | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2 | ||
| ) |
Add a line between the given points to the Postscript file.
Definition at line 605 of file vul_psfile.cxx.
|
inline |
Definition at line 56 of file vul_psfile.h.
|
private |
Set object translate and scale.
Definition at line 520 of file vul_psfile.cxx.
|
inline |
Definition at line 43 of file vul_psfile.h.
| void vul_psfile::point | ( | float | x, |
| float | y, | ||
| float | point_size = 0 |
||
| ) |
Add a point at the given coordinates to the Postscript file.
Definition at line 621 of file vul_psfile.cxx.
|
protected |
PostScript file header. Automatically called by the constructor.
PostScript file header.
Definition at line 554 of file vul_psfile.cxx.
| void vul_psfile::print_color_image | ( | const unsigned char * | data, |
| int | sizex, | ||
| int | sizey | ||
| ) |
Write 24 bit colour image.
Definition at line 323 of file vul_psfile.cxx.
|
protected |
the defined procedure for PostScript script use.
Definition at line 678 of file vul_psfile.cxx.
| void vul_psfile::print_greyscale_image | ( | const unsigned char * | data, |
| int | sizex, | ||
| int | sizey | ||
| ) |
Write 8 bit grey scale image.
Definition at line 225 of file vul_psfile.cxx.
| void vul_psfile::reset_bounding_box | ( | ) |
Rewrite output bounding box parameters.
Definition at line 99 of file vul_psfile.cxx.
|
private |
Reset PostScript header file.
Definition at line 573 of file vul_psfile.cxx.
|
inline |
Definition at line 54 of file vul_psfile.h.
|
inline |
Definition at line 53 of file vul_psfile.h.
|
inline |
Definition at line 55 of file vul_psfile.h.
|
protected |
Set Bounding Box Min and Max x, y.
Definition at line 203 of file vul_psfile.cxx.
|
protected |
Set Bounding Box Min and Max x, y.
Definition at line 215 of file vul_psfile.cxx.
|
inline |
Definition at line 46 of file vul_psfile.h.
|
inline |
Definition at line 47 of file vul_psfile.h.
|
inline |
Definition at line 45 of file vul_psfile.h.
|
protected |
Set ox, oy , iw, ih, iwf, ihf parameters for PostScript file use.
Definition at line 538 of file vul_psfile.cxx.
|
inline |
Definition at line 48 of file vul_psfile.h.
|
inline |
set the horizontal scaling (in percent); no scaling is 100.
Definition at line 50 of file vul_psfile.h.
|
inline |
set the vertical scaling (in percent); no scaling is 100.
Definition at line 52 of file vul_psfile.h.
|
protected |
|
private |
Definition at line 100 of file vul_psfile.h.
|
private |
Definition at line 100 of file vul_psfile.h.
|
private |
Definition at line 100 of file vul_psfile.h.
|
private |
Definition at line 116 of file vul_psfile.h.
|
private |
Definition at line 116 of file vul_psfile.h.
|
private |
Definition at line 113 of file vul_psfile.h.
|
private |
Definition at line 125 of file vul_psfile.h.
|
private |
Definition at line 126 of file vul_psfile.h.
|
private |
Definition at line 99 of file vul_psfile.h.
|
private |
Definition at line 99 of file vul_psfile.h.
|
private |
Definition at line 99 of file vul_psfile.h.
|
private |
Definition at line 108 of file vul_psfile.h.
|
private |
Definition at line 124 of file vul_psfile.h.
|
private |
Definition at line 122 of file vul_psfile.h.
|
private |
Definition at line 107 of file vul_psfile.h.
|
private |
Definition at line 103 of file vul_psfile.h.
|
private |
Definition at line 104 of file vul_psfile.h.
|
private |
Definition at line 103 of file vul_psfile.h.
|
private |
Definition at line 104 of file vul_psfile.h.
|
private |
Definition at line 101 of file vul_psfile.h.
|
private |
Definition at line 115 of file vul_psfile.h.
|
private |
Definition at line 115 of file vul_psfile.h.
|
private |
Definition at line 114 of file vul_psfile.h.
|
private |
Definition at line 114 of file vul_psfile.h.
|
private |
Definition at line 97 of file vul_psfile.h.
|
private |
Definition at line 103 of file vul_psfile.h.
|
private |
Definition at line 103 of file vul_psfile.h.
|
private |
Definition at line 106 of file vul_psfile.h.
|
private |
Definition at line 106 of file vul_psfile.h.
|
private |
Definition at line 111 of file vul_psfile.h.
|
private |
Definition at line 110 of file vul_psfile.h.
|
private |
Definition at line 109 of file vul_psfile.h.
|
private |
Definition at line 105 of file vul_psfile.h.
|
private |
Definition at line 105 of file vul_psfile.h.
|
private |
Definition at line 112 of file vul_psfile.h.
|
private |
Definition at line 102 of file vul_psfile.h.
|
private |
Definition at line 102 of file vul_psfile.h.
|
private |
Definition at line 121 of file vul_psfile.h.
|
private |
Definition at line 120 of file vul_psfile.h.
|
private |
Definition at line 107 of file vul_psfile.h.
1.8.15