1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512 |
- #ifndef _PLOTTER_H_
- #define _PLOTTER_H_ 1
- #define PL_LIBPLOT_VER_STRING "4.4"
- #define PL_LIBPLOT_VER 404
- extern const char pl_libplot_ver[8];
- #ifndef X_DISPLAY_MISSING
- #include <X11/Xlib.h>
- #include <X11/Intrinsic.h>
- #endif
- #ifndef NOT_LIBPLOTTER
- #include <cstdio>
- #include <iostream>
- using namespace std;
- #endif
- #ifndef NOT_LIBPLOTTER
- extern int (*pl_libplotter_warning_handler) (const char *msg);
- extern int (*pl_libplotter_error_handler) (const char *msg);
- #endif
- typedef struct
- {
- double x, y;
- } plPoint;
- typedef struct
- {
- int x, y;
- } plIntPoint;
- typedef enum
- {
- S_MOVETO, S_LINE, S_ARC, S_ELLARC, S_QUAD, S_CUBIC, S_CLOSEPATH
- } plPathSegmentType;
- typedef struct
- {
- plPathSegmentType type;
- plPoint p;
- plPoint pc;
- plPoint pd;
- } plPathSegment;
- typedef enum
- {
- PATH_SEGMENT_LIST,
- PATH_CIRCLE, PATH_ELLIPSE, PATH_BOX
- } plPathType;
- typedef struct
- {
- plPathType type;
- double llx, lly, urx, ury;
-
- plPathSegment *segments;
- int num_segments;
- int segments_len;
- bool primitive;
-
- plPoint pc;
- double radius;
- double rx, ry;
- double angle;
- plPoint p0, p1;
- bool clockwise;
- } plPath;
- typedef struct
- {
- plPathSegmentType type;
- plIntPoint p;
- plIntPoint pc;
- plIntPoint pd;
- double angle;
- } plIntPathSegment;
- typedef enum
- {
- AS_NONE,
- AS_UNIFORM,
- AS_AXES_PRESERVED,
- AS_ANY
- } plScalingType;
- typedef struct
- {
- int red;
- int green;
- int blue;
- } plColor;
- #define MI_PIXEL_TYPE struct \
- { \
- unsigned char type; \
- union \
- { \
- unsigned char index; \
- unsigned char rgb[3]; \
- } u; \
- }
- #define MI_PIXEL_INDEX_TYPE 0
- #define MI_PIXEL_RGB_TYPE 1
- #define MI_SAME_PIXEL(pixel1,pixel2) \
- (((pixel1).type == MI_PIXEL_INDEX_TYPE \
- && (pixel2).type == MI_PIXEL_INDEX_TYPE \
- && (pixel1).u.index == (pixel2).u.index) \
- || \
- ((pixel1).type == MI_PIXEL_RGB_TYPE \
- && (pixel2).type == MI_PIXEL_RGB_TYPE \
- && (pixel1).u.rgb[0] == (pixel2).u.rgb[0] \
- && (pixel1).u.rgb[1] == (pixel2).u.rgb[1] \
- && (pixel1).u.rgb[2] == (pixel2).u.rgb[2]))
- typedef struct
- {
- const char *name;
- const char *alt_name;
- const char *fig_name;
- bool metric;
- double xsize, ysize;
- double default_viewport_size;
- double pcl_hpgl2_xorigin;
- double pcl_hpgl2_yorigin;
- double hpgl2_plot_length;
- } plPageData;
- typedef struct
- {
-
- double m_user_to_ndc[6];
-
-
- double m[6];
-
- bool uniform;
- bool axes_preserved;
- bool nonreflection;
- } plTransform;
- typedef struct plDrawStateStruct
- {
- plPoint pos;
- plTransform transform;
- plPath *path;
- plPath **paths;
- int num_paths;
- plPoint start_point;
-
- const char *fill_rule;
- int fill_rule_type;
- const char *line_mode;
- int line_type;
- bool points_are_connected;
- const char *cap_mode;
- int cap_type;
- const char *join_mode;
- int join_type;
- double miter_limit;
- double line_width;
- bool line_width_is_default;
- double device_line_width;
- int quantized_device_line_width;
- const double *dash_array;
- int dash_array_len;
- double dash_offset;
- bool dash_array_in_effect;
- int pen_type;
- int fill_type;
- int orientation;
-
- const char *font_name;
- double font_size;
- bool font_size_is_default;
- double text_rotation;
- const char *true_font_name;
- double true_font_size;
- double font_ascent;
- double font_descent;
- double font_cap_height;
- int font_type;
- int typeface_index;
- int font_index;
- bool font_is_iso8859_1;
-
- plColor fgcolor;
- plColor fillcolor_base;
- plColor fillcolor;
- plColor bgcolor;
- bool bgcolor_suppressed;
- double default_line_width;
- double default_font_size;
- double hpgl_pen_width;
- int fig_font_point_size;
- int fig_fill_level;
- int fig_fgcolor;
- int fig_fillcolor;
- double ps_fgcolor_red;
- double ps_fgcolor_green;
- double ps_fgcolor_blue;
- double ps_fillcolor_red;
- double ps_fillcolor_green;
- double ps_fillcolor_blue;
- int ps_idraw_fgcolor;
- int ps_idraw_bgcolor;
- int ps_idraw_shading;
- plColor i_pen_color;
- plColor i_fill_color;
- plColor i_bg_color;
- unsigned char i_pen_color_index;
- unsigned char i_fill_color_index;
- unsigned char i_bg_color_index;
- bool i_pen_color_status;
- bool i_fill_color_status;
- bool i_bg_color_status;
- #ifndef X_DISPLAY_MISSING
- unsigned int x_font_pixel_size;
- XFontStruct *x_font_struct;
- const unsigned char *x_label;
- GC x_gc_fg;
- GC x_gc_fill;
- GC x_gc_bg;
- plColor x_current_fgcolor;
- plColor x_current_fillcolor;
- plColor x_current_bgcolor;
- unsigned long x_gc_fgcolor;
- unsigned long x_gc_fillcolor;
- unsigned long x_gc_bgcolor;
- bool x_gc_fgcolor_status;
- bool x_gc_fillcolor_status;
- bool x_gc_bgcolor_status;
- int x_gc_line_style;
- int x_gc_cap_style;
- int x_gc_join_style;
- int x_gc_line_width;
- const char *x_gc_dash_list;
- int x_gc_dash_list_len;
- int x_gc_dash_offset;
- int x_gc_fill_rule;
- #endif
- struct plDrawStateStruct *previous;
- } plDrawState;
- #define NUM_PS_FONTS 35
- #define NUM_PCL_FONTS 45
- typedef struct plOutbufStruct
- {
-
- struct plOutbufStruct *header;
-
- struct plOutbufStruct *trailer;
-
- char *base;
- unsigned long len;
- char *point;
- char *reset_point;
- unsigned long contents;
- unsigned long reset_contents;
-
- double xrange_min;
- double xrange_max;
- double yrange_min;
- double yrange_max;
- bool ps_font_used[NUM_PS_FONTS];
- bool pcl_font_used[NUM_PCL_FONTS];
- plColor bg_color;
- bool bg_color_suppressed;
-
- void * extra;
-
- struct plOutbufStruct *next;
- } plOutbuf;
- typedef struct
- {
- const char *name;
- unsigned char red;
- unsigned char green;
- unsigned char blue;
- } plColorNameInfo;
- typedef struct plCachedColorNameInfoStruct
- {
- const plColorNameInfo *info;
- struct plCachedColorNameInfoStruct *next;
- } plCachedColorNameInfo;
- typedef struct
- {
- plCachedColorNameInfo *cached_colors;
- } plColorNameCache;
- #ifndef X_DISPLAY_MISSING
- typedef struct plXFontRecordStruct
- {
- char *x_font_name;
- XFontStruct *x_font_struct;
- unsigned int x_font_pixel_size;
- unsigned int x_font_cap_height;
- bool x_font_is_iso8859_1;
- bool subset;
- unsigned char subset_vector[32];
- struct plXFontRecordStruct *next;
- } plXFontRecord;
- typedef struct plColorRecordStruct
- {
- XColor rgb;
- bool allocated;
- int frame_number;
- int page_number;
- struct plColorRecordStruct *next;
- } plColorRecord;
- #endif
- #define NUM_PLOTTER_PARAMETERS 33
- #define HPGL2_MAX_NUM_PENS 32
- #define FIG_MAX_NUM_USER_COLORS 512
- #ifdef NOT_LIBPLOTTER
- typedef enum
- {
- PL_GENERIC,
- PL_BITMAP,
- PL_META,
- PL_TEK,
- PL_REGIS,
- PL_HPGL,
- PL_PCL,
- PL_FIG,
- PL_CGM,
- PL_PS,
- PL_AI,
- PL_SVG,
- PL_GIF,
- PL_PNM
- #ifdef INCLUDE_PNG_SUPPORT
- , PL_PNG
- #endif
- #ifndef X_DISPLAY_MISSING
- , PL_X11_DRAWABLE
- , PL_X11
- #endif
- } plPlotterTag;
- #endif
- typedef enum
- {
- PL_OUTPUT_NONE,
-
- PL_OUTPUT_ONE_PAGE,
-
- PL_OUTPUT_ONE_PAGE_AT_A_TIME,
-
- PL_OUTPUT_PAGES_ALL_AT_ONCE,
-
- PL_OUTPUT_VIA_CUSTOM_ROUTINES,
-
- PL_OUTPUT_VIA_CUSTOM_ROUTINES_IN_REAL_TIME,
-
- PL_OUTPUT_VIA_CUSTOM_ROUTINES_TO_NON_STREAM
-
- } plPlotterOutputModel;
- typedef struct
- {
-
- #ifdef NOT_LIBPLOTTER
-
- plPlotterTag type;
- #endif
-
- plPlotterOutputModel output_model;
- FILE *infp;
- FILE *outfp;
- FILE *errfp;
- #ifndef NOT_LIBPLOTTER
- istream *instream;
- ostream *outstream;
- ostream *errstream;
- #endif
-
- void * params[NUM_PLOTTER_PARAMETERS];
-
- int have_wide_lines;
- int have_dash_array;
- int have_solid_fill;
- int have_odd_winding_fill;
- int have_nonzero_winding_fill;
- int have_settable_bg;
- int have_escaped_string_support;
- int have_ps_fonts;
- int have_pcl_fonts;
- int have_stick_fonts;
- int have_extra_stick_fonts;
- int have_other_fonts;
-
- int default_font_type;
- bool pcl_before_ps;
- bool have_horizontal_justification;
- bool have_vertical_justification;
- bool kern_stick_fonts;
- bool issue_font_warning;
-
- int max_unfilled_path_length;
- bool have_mixed_paths;
- plScalingType allowed_arc_scaling;
- plScalingType allowed_ellarc_scaling;
- plScalingType allowed_quad_scaling;
- plScalingType allowed_cubic_scaling;
- plScalingType allowed_box_scaling;
- plScalingType allowed_circle_scaling;
- plScalingType allowed_ellipse_scaling;
-
- bool emulate_color;
-
- plColorNameCache *color_name_cache;
-
- int display_model_type;
- int display_coors_type;
- bool flipped_y;
- int imin, imax, jmin, jmax;
- double xmin, xmax, ymin, ymax;
-
- const plPageData *page_data;
- double viewport_xsize, viewport_ysize;
- double viewport_xorigin, viewport_yorigin;
- double viewport_xoffset, viewport_yoffset;
-
- double m_ndc_to_device[6];
- bool open;
- bool opened;
- int page_number;
- bool fontsize_invoked;
- bool linewidth_invoked;
- int frame_number;
-
- bool font_warning_issued;
- bool pen_color_warning_issued;
- bool fill_color_warning_issued;
- bool bg_color_warning_issued;
-
- plOutbuf *page;
- plOutbuf *first_page;
- } plPlotterData;
- #ifdef Q___
- #undef Q___
- #endif
- #ifdef NOT_LIBPLOTTER
- #define Q___(rettype,f) rettype (*f)
- #define QQ___(rettype,f) rettype (*f)
- #else
- #define Q___(rettype,f) virtual rettype f
- #define QQ___(rettype,f) rettype f
- #endif
- #ifdef NOT_LIBPLOTTER
- #define R___(arg1) arg1,
- #define S___(arg1) arg1
- #else
- #define _plotter this
- #define _plotter_params this
- #define R___(arg1)
- #define S___(arg1)
- #endif
- #ifndef NOT_LIBPLOTTER
- class PlotterParams
- #else
- typedef struct plPlotterParamsStruct
- #endif
- {
- #ifndef NOT_LIBPLOTTER
- public:
-
- PlotterParams ();
- ~PlotterParams ();
- PlotterParams (const PlotterParams& oldPlotterParams);
- PlotterParams& operator= (const PlotterParams& oldPlotterParams);
- #endif
-
- QQ___(int,setplparam) (R___(struct plPlotterParamsStruct *_plotter_params) const char *parameter, void * value);
-
- void * plparams[NUM_PLOTTER_PARAMETERS];
- }
- #ifdef NOT_LIBPLOTTER
- PlotterParams;
- #else
- ;
- #endif
- #ifndef NOT_LIBPLOTTER
- class Plotter
- #else
- typedef struct plPlotterStruct
- #endif
- {
- #ifndef NOT_LIBPLOTTER
- private:
-
- Plotter (const Plotter& oldplotter);
- Plotter& operator= (const Plotter& oldplotter);
-
- double _g_alabel_hershey (const unsigned char *s, int x_justify, int y_justify);
- double _g_flabelwidth_hershey (const unsigned char *s);
- void _g_draw_hershey_glyph (int num, double charsize, int type, bool oblique);
- void _g_draw_hershey_penup_stroke (double dx, double dy, double charsize, bool oblique);
- void _g_draw_hershey_string (const unsigned short *string);
- void _g_draw_hershey_stroke (bool pendown, double deltax, double deltay);
-
- double _g_render_non_hershey_string (const char *s, bool do_render, int x_justify, int y_justify);
- double _g_render_simple_string (const unsigned char *s, bool do_render, int h_just, int v_just);
- unsigned short * _g_controlify (const unsigned char *);
- void _g_copy_params_to_plotter (const PlotterParams *params);
- void _g_create_first_drawing_state (void);
- void _g_delete_first_drawing_state (void);
- void _g_free_params_in_plotter (void);
- void _g_maybe_replace_arc (void);
- void _g_set_font (void);
- public:
-
- Plotter (FILE *infile, FILE *outfile, FILE *errfile);
- Plotter (FILE *outfile);
- Plotter (istream& in, ostream& out, ostream& err);
- Plotter (ostream& out);
- Plotter ();
-
- Plotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- Plotter (FILE *outfile, PlotterParams ¶ms);
- Plotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- Plotter (ostream& out, PlotterParams ¶ms);
- Plotter (PlotterParams ¶ms);
-
- virtual ~Plotter ();
-
- static int parampl (const char *parameter, void * value);
-
- int alabel (int x_justify, int y_justify, const char *s);
- int arc (int xc, int yc, int x0, int y0, int x1, int y1);
- int arcrel (int dxc, int dyc, int dx0, int dy0, int dx1, int dy1);
- int bezier2 (int x0, int y0, int x1, int y1, int x2, int y2);
- int bezier2rel (int dx0, int dy0, int dx1, int dy1, int dx2, int dy2);
- int bezier3 (int x0, int y0, int x1, int y1, int x2, int y2, int x3, int y3);
- int bezier3rel (int dx0, int dy0, int dx1, int dy1, int dx2, int dy2, int dx3, int dy3);
- int bgcolor (int red, int green, int blue);
- int bgcolorname (const char *name);
- int box (int x0, int y0, int x1, int y1);
- int boxrel (int dx0, int dy0, int dx1, int dy1);
- int capmod (const char *s);
- int circle (int x, int y, int r);
- int circlerel (int dx, int dy, int r);
- int closepath (void);
- int closepl (void);
- int color (int red, int green, int blue);
- int colorname (const char *name);
- int cont (int x, int y);
- int contrel (int dx, int dy);
- int ellarc (int xc, int yc, int x0, int y0, int x1, int y1);
- int ellarcrel (int dxc, int dyc, int dx0, int dy0, int dx1, int dy1);
- int ellipse (int x, int y, int rx, int ry, int angle);
- int ellipserel (int dx, int dy, int rx, int ry, int angle);
- int endpath (void);
- int endsubpath (void);
- int erase (void);
- int farc (double xc, double yc, double x0, double y0, double x1, double y1);
- int farcrel (double dxc, double dyc, double dx0, double dy0, double dx1, double dy1);
- int fbezier2 (double x0, double y0, double x1, double y1, double x2, double y2);
- int fbezier2rel (double dx0, double dy0, double dx1, double dy1, double dx2, double dy2);
- int fbezier3 (double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3);
- int fbezier3rel (double dx0, double dy0, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3);
- int fbox (double x0, double y0, double x1, double y1);
- int fboxrel (double dx0, double dy0, double dx1, double dy1);
- int fcircle (double x, double y, double r);
- int fcirclerel (double dx, double dy, double r);
- int fconcat (double m0, double m1, double m2, double m3, double m4, double m5);
- int fcont (double x, double y);
- int fcontrel (double dx, double dy);
- int fellarc (double xc, double yc, double x0, double y0, double x1, double y1);
- int fellarcrel (double dxc, double dyc, double dx0, double dy0, double dx1, double dy1);
- int fellipse (double x, double y, double rx, double ry, double angle);
- int fellipserel (double dx, double dy, double rx, double ry, double angle);
- double ffontname (const char *s);
- double ffontsize (double size);
- int fillcolor (int red, int green, int blue);
- int fillcolorname (const char *name);
- int fillmod (const char *s);
- int filltype (int level);
- double flabelwidth (const char *s);
- int fline (double x0, double y0, double x1, double y1);
- int flinedash (int n, const double *dashes, double offset);
- int flinerel (double dx0, double dy0, double dx1, double dy1);
- int flinewidth (double size);
- int flushpl (void);
- int fmarker (double x, double y, int type, double size);
- int fmarkerrel (double dx, double dy, int type, double size);
- int fmiterlimit (double limit);
- int fmove (double x, double y);
- int fmoverel (double dx, double dy);
- int fontname (const char *s);
- int fontsize (int size);
- int fpoint (double x, double y);
- int fpointrel (double dx, double dy);
- int frotate (double theta);
- int fscale (double x, double y);
- int fsetmatrix (double m0, double m1, double m2, double m3, double m4, double m5);
- int fspace (double x0, double y0, double x1, double y1);
- int fspace2 (double x0, double y0, double x1, double y1, double x2, double y2);
- double ftextangle (double angle);
- int ftranslate (double x, double y);
- int havecap (const char *s);
- int joinmod (const char *s);
- int label (const char *s);
- int labelwidth (const char *s);
- int line (int x0, int y0, int x1, int y1);
- int linedash (int n, const int *dashes, int offset);
- int linemod (const char *s);
- int linerel (int dx0, int dy0, int dx1, int dy1);
- int linewidth (int size);
- int marker (int x, int y, int type, int size);
- int markerrel (int dx, int dy, int type, int size);
- int move (int x, int y);
- int moverel (int dx, int dy);
- int openpl (void);
- int orientation (int direction);
- FILE* outfile (FILE* newstream);
- int pencolor (int red, int green, int blue);
- int pencolorname (const char *name);
- int pentype (int level);
- int point (int x, int y);
- int pointrel (int dx, int dy);
- int restorestate (void);
- int savestate (void);
- int space (int x0, int y0, int x1, int y1);
- int space2 (int x0, int y0, int x1, int y1, int x2, int y2);
- int textangle (int angle);
-
- void *_get_hershey_font_info (void);
- void *_get_ps_font_info (void);
- void *_get_pcl_font_info (void);
- void *_get_stick_font_info (void);
- protected:
- #endif
-
-
- Q___(void,initialize) (S___(struct plPlotterStruct *_plotter));
- Q___(void,terminate) (S___(struct plPlotterStruct *_plotter));
-
- Q___(bool,begin_page) (S___(struct plPlotterStruct *_plotter));
- Q___(bool,erase_page) (S___(struct plPlotterStruct *_plotter));
- Q___(bool,end_page) (S___(struct plPlotterStruct *_plotter));
-
- Q___(void,push_state) (S___(struct plPlotterStruct *_plotter));
-
- Q___(void,pop_state) (S___(struct plPlotterStruct *_plotter));
-
- Q___(void,paint_path) (S___(struct plPlotterStruct *_plotter));
-
- Q___(bool,paint_paths) (S___(struct plPlotterStruct *_plotter));
-
- Q___(bool,path_is_flushable) (S___(struct plPlotterStruct *_plotter));
-
- Q___(void,maybe_prepaint_segments) (R___(struct plPlotterStruct *_plotter) int prev_num_segments);
-
- Q___(bool,paint_marker) (R___(struct plPlotterStruct *_plotter) int type, double size);
-
- Q___(void,paint_point) (S___(struct plPlotterStruct *_plotter));
-
-
- Q___(void,paint_text_string_with_escapes) (R___(struct plPlotterStruct *_plotter) const unsigned char *s, int x_justify, int y_justify);
- Q___(double,paint_text_string) (R___(struct plPlotterStruct *_plotter) const unsigned char *s, int h_just, int v_just);
- Q___(double,get_text_width) (R___(struct plPlotterStruct *_plotter) const unsigned char *s);
-
- Q___(bool,retrieve_font) (S___(struct plPlotterStruct *_plotter));
-
- Q___(bool,flush_output) (S___(struct plPlotterStruct *_plotter));
-
- Q___(void,warning) (R___(struct plPlotterStruct *_plotter) const char *msg);
- Q___(void,error) (R___(struct plPlotterStruct *_plotter) const char *msg);
-
-
- plPlotterData *data;
-
- plDrawState *drawstate;
- #ifdef NOT_LIBPLOTTER
-
-
-
-
- void * b_arc_cache_data;
- int b_xn, b_yn;
- void * b_painted_set;
- void * b_canvas;
-
-
- bool meta_portable_output;
-
- plPoint meta_pos;
- bool meta_position_is_unknown;
- double meta_m_user_to_ndc[6];
-
- int meta_fill_rule_type;
- int meta_line_type;
- bool meta_points_are_connected;
- int meta_cap_type;
- int meta_join_type;
- double meta_miter_limit;
- double meta_line_width;
- bool meta_line_width_is_default;
- const double *meta_dash_array;
- int meta_dash_array_len;
- double meta_dash_offset;
- bool meta_dash_array_in_effect;
- int meta_pen_type;
- int meta_fill_type;
- int meta_orientation;
-
- const char *meta_font_name;
- double meta_font_size;
- bool meta_font_size_is_default;
- double meta_text_rotation;
-
- plColor meta_fgcolor;
- plColor meta_fillcolor_base;
- plColor meta_bgcolor;
-
- int tek_display_type;
- int tek_mode;
- int tek_line_type;
- bool tek_mode_is_unknown;
- bool tek_line_type_is_unknown;
- int tek_kermit_fgcolor;
- int tek_kermit_bgcolor;
- bool tek_position_is_unknown;
- plIntPoint tek_pos;
-
- plIntPoint regis_pos;
- bool regis_position_is_unknown;
- int regis_line_type;
- bool regis_line_type_is_unknown;
- int regis_fgcolor;
- int regis_bgcolor;
- bool regis_fgcolor_is_unknown;
- bool regis_bgcolor_is_unknown;
-
- int hpgl_version;
- int hpgl_rotation;
- double hpgl_plot_length;
- plPoint hpgl_p1;
- plPoint hpgl_p2;
- bool hpgl_have_screened_vectors;
- bool hpgl_have_char_fill;
- bool hpgl_can_assign_colors;
- bool hpgl_use_opaque_mode;
- plColor hpgl_pen_color[HPGL2_MAX_NUM_PENS];
- int hpgl_pen_defined[HPGL2_MAX_NUM_PENS];
- int hpgl_pen;
- int hpgl_free_pen;
- bool hpgl_bad_pen;
- bool hpgl_pendown;
- double hpgl_pen_width;
- int hpgl_line_type;
- int hpgl_cap_style;
- int hpgl_join_style;
- double hpgl_miter_limit;
- int hpgl_pen_type;
- double hpgl_pen_option1;
- double hpgl_pen_option2;
- int hpgl_fill_type;
- double hpgl_fill_option1;
- double hpgl_fill_option2;
- int hpgl_char_rendering_type;
- int hpgl_symbol_set;
- int hpgl_spacing;
- int hpgl_posture;
- int hpgl_stroke_weight;
- int hpgl_pcl_typeface;
- int hpgl_charset_lower;
- int hpgl_charset_upper;
- double hpgl_rel_char_height;
- double hpgl_rel_char_width;
- double hpgl_rel_label_rise;
- double hpgl_rel_label_run;
- double hpgl_tan_char_slant;
- bool hpgl_position_is_unknown;
- plIntPoint hpgl_pos;
- int fig_drawing_depth;
- int fig_num_usercolors;
- long int fig_usercolors[FIG_MAX_NUM_USER_COLORS];
- bool fig_colormap_warning_issued;
- int cgm_encoding;
- int cgm_max_version;
- int cgm_version;
- int cgm_profile;
- int cgm_need_color;
- int cgm_page_version;
- int cgm_page_profile;
- bool cgm_page_need_color;
- plColor cgm_line_color;
- plColor cgm_edge_color;
- plColor cgm_fillcolor;
- plColor cgm_marker_color;
- plColor cgm_text_color;
- plColor cgm_bgcolor;
- bool cgm_bgcolor_suppressed;
- int cgm_line_type;
- double cgm_dash_offset;
- int cgm_join_style;
- int cgm_cap_style;
- int cgm_dash_cap_style;
- int cgm_line_width;
- int cgm_interior_style;
- int cgm_edge_type;
- double cgm_edge_dash_offset;
- int cgm_edge_join_style;
- int cgm_edge_cap_style;
- int cgm_edge_dash_cap_style;
- int cgm_edge_width;
- bool cgm_edge_is_visible;
- double cgm_miter_limit;
- int cgm_marker_type;
- int cgm_marker_size;
- int cgm_char_height;
- int cgm_char_base_vector_x;
- int cgm_char_base_vector_y;
- int cgm_char_up_vector_x;
- int cgm_char_up_vector_y;
- int cgm_horizontal_text_alignment;
- int cgm_vertical_text_alignment;
- int cgm_font_id;
- int cgm_charset_lower;
- int cgm_charset_upper;
- int cgm_restricted_text_type;
- int ai_version;
- double ai_pen_cyan;
- double ai_pen_magenta;
- double ai_pen_yellow;
- double ai_pen_black;
- double ai_fill_cyan;
- double ai_fill_magenta;
- double ai_fill_yellow;
- double ai_fill_black;
- bool ai_cyan_used;
- bool ai_magenta_used;
- bool ai_yellow_used;
- bool ai_black_used;
- int ai_cap_style;
- int ai_join_style;
- double ai_miter_limit;
- int ai_line_type;
- double ai_line_width;
- int ai_fill_rule_type;
- double s_matrix[6];
- bool s_matrix_is_unknown;
- bool s_matrix_is_bogus;
- plColor s_bgcolor;
- bool s_bgcolor_suppressed;
- bool n_portable_output;
- #ifdef INCLUDE_PNG_SUPPORT
- bool z_interlace;
- bool z_transparent;
- plColor z_transparent_color;
- #endif
- int i_xn, i_yn;
- int i_num_pixels;
- bool i_animation;
- int i_iterations;
- int i_delay;
- bool i_interlace;
- bool i_transparent;
- plColor i_transparent_color;
- void * i_arc_cache_data;
- int i_transparent_index;
- void * i_painted_set;
- void * i_canvas;
- plColor i_colormap[256];
- int i_num_color_indices;
- bool i_frame_nonempty;
- int i_bit_depth;
- int i_pixels_scanned;
- int i_pass;
- plIntPoint i_hot;
- plColor i_global_colormap[256];
- int i_num_global_color_indices;
- bool i_header_written;
- #ifndef X_DISPLAY_MISSING
- Display *x_dpy;
- Visual *x_visual;
- Drawable x_drawable1;
- Drawable x_drawable2;
- Drawable x_drawable3;
- int x_double_buffering;
- long int x_max_polyline_len;
- plXFontRecord *x_fontlist;
- plColorRecord *x_colorlist;
- Colormap x_cmap;
- int x_cmap_type;
- bool x_colormap_warning_issued;
- bool x_bg_color_warning_issued;
- int x_paint_pixel_count;
- XtAppContext y_app_con;
- Widget y_toplevel;
- Widget y_canvas;
- Drawable y_drawable4;
- bool y_auto_flush;
- bool y_vanish_on_delete;
- pid_t *y_pids;
- int y_num_pids;
- int y_event_handler_count;
- #endif
- #endif
- #ifndef NOT_LIBPLOTTER
-
-
- static Plotter **_plotters;
- static int _plotters_len;
-
- static PlotterParams *_old_api_global_plotter_params;
- #endif
-
- #ifndef NOT_LIBPLOTTER
- void _flush_plotter_outstreams (void);
- #endif
- }
- #ifdef NOT_LIBPLOTTER
- Plotter;
- #else
- ;
- #endif
- #undef Q___
- #ifndef NOT_LIBPLOTTER
- class MetaPlotter : public Plotter
- {
- private:
-
- MetaPlotter (const MetaPlotter& oldplotter);
- MetaPlotter& operator= (const MetaPlotter& oldplotter);
- public:
-
- MetaPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- MetaPlotter (FILE *outfile);
- MetaPlotter (istream& in, ostream& out, ostream& err);
- MetaPlotter (ostream& out);
- MetaPlotter ();
-
- MetaPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- MetaPlotter (FILE *outfile, PlotterParams ¶ms);
- MetaPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- MetaPlotter (ostream& out, PlotterParams ¶ms);
- MetaPlotter (PlotterParams ¶ms);
-
- virtual ~MetaPlotter ();
- protected:
-
- bool begin_page (void);
- bool end_page (void);
- bool erase_page (void);
- bool paint_marker (int type, double size);
- bool paint_paths (void);
- bool path_is_flushable (void);
- void paint_text_string_with_escapes (const unsigned char *s, int h_just, int v_just);
- void initialize (void);
- void maybe_prepaint_segments (int prev_num_segments);
- void paint_path (void);
- void paint_point (void);
- void terminate (void);
-
- void _m_emit_integer (int x);
- void _m_emit_float (double x);
- void _m_emit_op_code (int c);
- void _m_emit_string (const char *s);
- void _m_emit_terminator (void);
- void _m_paint_path_internal (const plPath *path);
- void _m_set_attributes (unsigned int mask);
-
-
- bool meta_portable_output;
-
- plPoint meta_pos;
- bool meta_position_is_unknown;
- double meta_m_user_to_ndc[6];
-
- int meta_fill_rule_type;
- int meta_line_type;
- bool meta_points_are_connected;
- int meta_cap_type;
- int meta_join_type;
- double meta_miter_limit;
- double meta_line_width;
- bool meta_line_width_is_default;
- const double *meta_dash_array;
- int meta_dash_array_len;
- double meta_dash_offset;
- bool meta_dash_array_in_effect;
- int meta_pen_type;
- int meta_fill_type;
- int meta_orientation;
-
- const char *meta_font_name;
- double meta_font_size;
- bool meta_font_size_is_default;
- double meta_text_rotation;
-
- plColor meta_fgcolor;
- plColor meta_fillcolor_base;
- plColor meta_bgcolor;
- };
- class BitmapPlotter : public Plotter
- {
- private:
-
- BitmapPlotter (const BitmapPlotter& oldplotter);
- BitmapPlotter& operator= (const BitmapPlotter& oldplotter);
- public:
-
- BitmapPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- BitmapPlotter (FILE *outfile);
- BitmapPlotter (istream& in, ostream& out, ostream& err);
- BitmapPlotter (ostream& out);
- BitmapPlotter ();
-
- BitmapPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- BitmapPlotter (FILE *outfile, PlotterParams ¶ms);
- BitmapPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- BitmapPlotter (ostream& out, PlotterParams ¶ms);
- BitmapPlotter (PlotterParams ¶ms);
-
- virtual ~BitmapPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
-
- virtual int _maybe_output_image (void);
-
- void _b_delete_image (void);
- void _b_draw_elliptic_arc (plPoint p0, plPoint p1, plPoint pc);
- void _b_draw_elliptic_arc_2 (plPoint p0, plPoint p1, plPoint pc);
- void _b_draw_elliptic_arc_internal (int xorigin, int yorigin, unsigned int squaresize_x, unsigned int squaresize_y, int startangle, int anglerange);
- void _b_new_image (void);
-
- void * b_arc_cache_data;
- int b_xn, b_yn;
- void * b_painted_set;
- void * b_canvas;
- };
- class TekPlotter : public Plotter
- {
- private:
-
- TekPlotter (const TekPlotter& oldplotter);
- TekPlotter& operator= (const TekPlotter& oldplotter);
- public:
-
- TekPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- TekPlotter (FILE *outfile);
- TekPlotter (istream& in, ostream& out, ostream& err);
- TekPlotter (ostream& out);
- TekPlotter ();
-
- TekPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- TekPlotter (FILE *outfile, PlotterParams ¶ms);
- TekPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- TekPlotter (ostream& out, PlotterParams ¶ms);
- TekPlotter (PlotterParams ¶ms);
-
- virtual ~TekPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- bool path_is_flushable (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void maybe_prepaint_segments (int prev_num_segments);
-
- void _t_set_attributes (void);
- void _t_set_bg_color (void);
- void _t_set_pen_color (void);
- void _t_tek_mode (int newmode);
- void _t_tek_move (int xx, int yy);
- void _t_tek_vector (int xx, int yy);
- void _t_tek_vector_compressed (int xx, int yy, int oldxx, int oldyy, bool force);
-
- int tek_display_type;
- int tek_mode;
- int tek_line_type;
- bool tek_mode_is_unknown;
- bool tek_line_type_is_unknown;
- int tek_kermit_fgcolor;
- int tek_kermit_bgcolor;
- bool tek_position_is_unknown;
- plIntPoint tek_pos;
- };
- class ReGISPlotter : public Plotter
- {
- private:
-
- ReGISPlotter (const ReGISPlotter& oldplotter);
- ReGISPlotter& operator= (const ReGISPlotter& oldplotter);
- public:
-
- ReGISPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- ReGISPlotter (FILE *outfile);
- ReGISPlotter (istream& in, ostream& out, ostream& err);
- ReGISPlotter (ostream& out);
- ReGISPlotter ();
-
- ReGISPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- ReGISPlotter (FILE *outfile, PlotterParams ¶ms);
- ReGISPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- ReGISPlotter (ostream& out, PlotterParams ¶ms);
- ReGISPlotter (PlotterParams ¶ms);
-
- virtual ~ReGISPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- bool path_is_flushable (void);
- void initialize (void);
- void terminate (void);
- void maybe_prepaint_segments (int prev_num_segments);
- void paint_path (void);
- bool paint_paths (void);
-
- void _r_set_attributes (void);
- void _r_set_bg_color (void);
- void _r_set_fill_color (void);
- void _r_set_pen_color (void);
- void _r_regis_move (int xx, int yy);
-
- plIntPoint regis_pos;
- bool regis_position_is_unknown;
- int regis_line_type;
- bool regis_line_type_is_unknown;
- int regis_fgcolor;
- int regis_bgcolor;
- bool regis_fgcolor_is_unknown;
- bool regis_bgcolor_is_unknown;
- };
- class HPGLPlotter : public Plotter
- {
- private:
-
- HPGLPlotter (const HPGLPlotter& oldplotter);
- HPGLPlotter& operator= (const HPGLPlotter& oldplotter);
- public:
-
- HPGLPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- HPGLPlotter (FILE *outfile);
- HPGLPlotter (istream& in, ostream& out, ostream& err);
- HPGLPlotter (ostream& out);
- HPGLPlotter ();
-
- HPGLPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- HPGLPlotter (FILE *outfile, PlotterParams ¶ms);
- HPGLPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- HPGLPlotter (ostream& out, PlotterParams ¶ms);
- HPGLPlotter (PlotterParams ¶ms);
-
- virtual ~HPGLPlotter ();
- protected:
-
- void initialize (void);
- void terminate (void);
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void paint_path (void);
- bool paint_paths (void);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
-
- virtual void _maybe_switch_to_hpgl (void);
- virtual void _maybe_switch_from_hpgl (void);
-
- bool _h_hpgl2_maybe_update_font (void);
- bool _h_hpgl_maybe_update_font (void);
- bool _h_parse_pen_string (const char *pen_s);
- int _h_hpgl_pseudocolor (int red, int green, int blue, bool restrict_white);
- void _h_set_attributes (void);
- void _h_set_fill_color (bool force_pen_color);
- void _h_set_font (void);
- void _h_set_pen_color (int hpgl_object_type);
- void _h_set_position (void);
- void _h_hpgl_shaded_pseudocolor (int red, int green, int blue, int *pen, double *shading);
- void _h_set_hpgl_fill_type (int fill_type, double option1, double option2);
- void _h_set_hpgl_pen_type (int pen_type, double option1, double option2);
- void _h_set_hpgl_pen (int pen);
-
- int hpgl_version;
- int hpgl_rotation;
- double hpgl_plot_length;
- plPoint hpgl_p1;
- plPoint hpgl_p2;
- bool hpgl_have_screened_vectors;
- bool hpgl_have_char_fill;
- bool hpgl_can_assign_colors;
- bool hpgl_use_opaque_mode;
- plColor hpgl_pen_color[HPGL2_MAX_NUM_PENS];
- int hpgl_pen_defined[HPGL2_MAX_NUM_PENS];
- int hpgl_pen;
- int hpgl_free_pen;
- bool hpgl_bad_pen;
- bool hpgl_pendown;
- double hpgl_pen_width;
- int hpgl_line_type;
- int hpgl_cap_style;
- int hpgl_join_style;
- double hpgl_miter_limit;
- int hpgl_pen_type;
- double hpgl_pen_option1;
- double hpgl_pen_option2;
- int hpgl_fill_type;
- double hpgl_fill_option1;
- double hpgl_fill_option2;
- int hpgl_char_rendering_type;
- int hpgl_symbol_set;
- int hpgl_spacing;
- int hpgl_posture;
- int hpgl_stroke_weight;
- int hpgl_pcl_typeface;
- int hpgl_charset_lower;
- int hpgl_charset_upper;
- double hpgl_rel_char_height;
- double hpgl_rel_char_width;
- double hpgl_rel_label_rise;
- double hpgl_rel_label_run;
- double hpgl_tan_char_slant;
- bool hpgl_position_is_unknown;
- plIntPoint hpgl_pos;
- };
- class PCLPlotter : public HPGLPlotter
- {
- private:
-
- PCLPlotter (const PCLPlotter& oldplotter);
- PCLPlotter& operator= (const PCLPlotter& oldplotter);
- public:
-
- PCLPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- PCLPlotter (FILE *outfile);
- PCLPlotter (istream& in, ostream& out, ostream& err);
- PCLPlotter (ostream& out);
- PCLPlotter ();
-
- PCLPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- PCLPlotter (FILE *outfile, PlotterParams ¶ms);
- PCLPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- PCLPlotter (ostream& out, PlotterParams ¶ms);
- PCLPlotter (PlotterParams ¶ms);
-
- virtual ~PCLPlotter ();
- protected:
-
- void initialize (void);
- void terminate (void);
-
- void _maybe_switch_to_hpgl (void);
- void _maybe_switch_from_hpgl (void);
- };
- class FigPlotter : public Plotter
- {
- private:
-
- FigPlotter (const FigPlotter& oldplotter);
- FigPlotter& operator= (const FigPlotter& oldplotter);
- public:
-
- FigPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- FigPlotter (FILE *outfile);
- FigPlotter (istream& in, ostream& out, ostream& err);
- FigPlotter (ostream& out);
- FigPlotter ();
-
- FigPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- FigPlotter (FILE *outfile, PlotterParams ¶ms);
- FigPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- FigPlotter (ostream& out, PlotterParams ¶ms);
- FigPlotter (PlotterParams ¶ms);
-
- virtual ~FigPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
- bool retrieve_font (void);
-
- int _f_fig_color (int red, int green, int blue);
- void _f_compute_line_style (int *style, double *spacing);
- void _f_draw_arc_internal (double xc, double yc, double x0, double y0, double x1, double y1);
- void _f_draw_box_internal (plPoint p0, plPoint p1);
- void _f_draw_ellipse_internal (double x, double y, double rx, double ry, double angle, int subtype);
- void _f_set_fill_color (void);
- void _f_set_pen_color (void);
-
- int fig_drawing_depth;
- int fig_num_usercolors;
- long int fig_usercolors[FIG_MAX_NUM_USER_COLORS];
- bool fig_colormap_warning_issued;
- };
- class CGMPlotter : public Plotter
- {
- private:
-
- CGMPlotter (const CGMPlotter& oldplotter);
- CGMPlotter& operator= (const CGMPlotter& oldplotter);
- public:
-
- CGMPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- CGMPlotter (FILE *outfile);
- CGMPlotter (istream& in, ostream& out, ostream& err);
- CGMPlotter (ostream& out);
- CGMPlotter ();
-
- CGMPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- CGMPlotter (FILE *outfile, PlotterParams ¶ms);
- CGMPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- CGMPlotter (ostream& out, PlotterParams ¶ms);
- CGMPlotter (PlotterParams ¶ms);
-
- virtual ~CGMPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_marker (int type, double size);
- bool paint_paths (void);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
-
- void _c_set_attributes (int cgm_object_type);
- void _c_set_bg_color (void);
- void _c_set_fill_color (int cgm_object_type);
- void _c_set_pen_color (int cgm_object_type);
-
- int cgm_encoding;
- int cgm_max_version;
- int cgm_version;
- int cgm_profile;
- int cgm_need_color;
- int cgm_page_version;
- int cgm_page_profile;
- bool cgm_page_need_color;
- plColor cgm_line_color;
- plColor cgm_edge_color;
- plColor cgm_fillcolor;
- plColor cgm_marker_color;
- plColor cgm_text_color;
- plColor cgm_bgcolor;
- bool cgm_bgcolor_suppressed;
- int cgm_line_type;
- double cgm_dash_offset;
- int cgm_join_style;
- int cgm_cap_style;
- int cgm_dash_cap_style;
- int cgm_line_width;
- int cgm_interior_style;
- int cgm_edge_type;
- double cgm_edge_dash_offset;
- int cgm_edge_join_style;
- int cgm_edge_cap_style;
- int cgm_edge_dash_cap_style;
- int cgm_edge_width;
- bool cgm_edge_is_visible;
- double cgm_miter_limit;
- int cgm_marker_type;
- int cgm_marker_size;
- int cgm_char_height;
- int cgm_char_base_vector_x;
- int cgm_char_base_vector_y;
- int cgm_char_up_vector_x;
- int cgm_char_up_vector_y;
- int cgm_horizontal_text_alignment;
- int cgm_vertical_text_alignment;
- int cgm_font_id;
- int cgm_charset_lower;
- int cgm_charset_upper;
- int cgm_restricted_text_type;
- };
- class PSPlotter : public Plotter
- {
- private:
-
- PSPlotter (const PSPlotter& oldplotter);
- PSPlotter& operator= (const PSPlotter& oldplotter);
- public:
-
- PSPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- PSPlotter (FILE *outfile);
- PSPlotter (istream& in, ostream& out, ostream& err);
- PSPlotter (ostream& out);
- PSPlotter ();
-
- PSPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- PSPlotter (FILE *outfile, PlotterParams ¶ms);
- PSPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- PSPlotter (ostream& out, PlotterParams ¶ms);
- PSPlotter (PlotterParams ¶ms);
-
- virtual ~PSPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
-
- double _p_emit_common_attributes (void);
- void _p_compute_idraw_bgcolor (void);
- void _p_fellipse_internal (double x, double y, double rx, double ry, double angle, bool circlep);
- void _p_set_fill_color (void);
- void _p_set_pen_color (void);
- };
- class AIPlotter : public Plotter
- {
- private:
-
- AIPlotter (const AIPlotter& oldplotter);
- AIPlotter& operator= (const AIPlotter& oldplotter);
- public:
-
- AIPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- AIPlotter (FILE *outfile);
- AIPlotter (istream& in, ostream& out, ostream& err);
- AIPlotter (ostream& out);
- AIPlotter ();
-
- AIPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- AIPlotter (FILE *outfile, PlotterParams ¶ms);
- AIPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- AIPlotter (ostream& out, PlotterParams ¶ms);
- AIPlotter (PlotterParams ¶ms);
-
- virtual ~AIPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
-
- void _a_set_attributes (void);
- void _a_set_fill_color (bool force_pen_color);
- void _a_set_pen_color (void);
-
- int ai_version;
- double ai_pen_cyan;
- double ai_pen_magenta;
- double ai_pen_yellow;
- double ai_pen_black;
- double ai_fill_cyan;
- double ai_fill_magenta;
- double ai_fill_yellow;
- double ai_fill_black;
- bool ai_cyan_used;
- bool ai_magenta_used;
- bool ai_yellow_used;
- bool ai_black_used;
- int ai_cap_style;
- int ai_join_style;
- double ai_miter_limit;
- int ai_line_type;
- double ai_line_width;
- int ai_fill_rule_type;
- };
- class SVGPlotter : public Plotter
- {
- private:
-
- SVGPlotter (const SVGPlotter& oldplotter);
- SVGPlotter& operator= (const SVGPlotter& oldplotter);
- public:
-
- SVGPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- SVGPlotter (FILE *outfile);
- SVGPlotter (istream& in, ostream& out, ostream& err);
- SVGPlotter (ostream& out);
- SVGPlotter ();
-
- SVGPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- SVGPlotter (FILE *outfile, PlotterParams ¶ms);
- SVGPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- SVGPlotter (ostream& out, PlotterParams ¶ms);
- SVGPlotter (PlotterParams ¶ms);
-
- virtual ~SVGPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
-
- void _s_set_matrix (const double m_local[6]);
-
- double s_matrix[6];
- bool s_matrix_is_unknown;
- bool s_matrix_is_bogus;
- plColor s_bgcolor;
- bool s_bgcolor_suppressed;
- };
- class PNMPlotter : public BitmapPlotter
- {
- private:
-
- PNMPlotter (const PNMPlotter& oldplotter);
- PNMPlotter& operator= (const PNMPlotter& oldplotter);
- public:
-
- PNMPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- PNMPlotter (FILE *outfile);
- PNMPlotter (istream& in, ostream& out, ostream& err);
- PNMPlotter (ostream& out);
- PNMPlotter ();
-
- PNMPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- PNMPlotter (FILE *outfile, PlotterParams ¶ms);
- PNMPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- PNMPlotter (ostream& out, PlotterParams ¶ms);
- PNMPlotter (PlotterParams ¶ms);
-
- virtual ~PNMPlotter ();
- protected:
-
- void initialize (void);
- void terminate (void);
-
- int _maybe_output_image (void);
-
- void _n_write_pnm (void);
- void _n_write_pbm (void);
- void _n_write_pgm (void);
- void _n_write_ppm (void);
-
- bool n_portable_output;
- };
- #ifdef INCLUDE_PNG_SUPPORT
- class PNGPlotter : public BitmapPlotter
- {
- private:
-
- PNGPlotter (const PNGPlotter& oldplotter);
- PNGPlotter& operator= (const PNGPlotter& oldplotter);
- public:
-
- PNGPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- PNGPlotter (FILE *outfile);
- PNGPlotter (istream& in, ostream& out, ostream& err);
- PNGPlotter (ostream& out);
- PNGPlotter ();
-
- PNGPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- PNGPlotter (FILE *outfile, PlotterParams ¶ms);
- PNGPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- PNGPlotter (ostream& out, PlotterParams ¶ms);
- PNGPlotter (PlotterParams ¶ms);
-
- virtual ~PNGPlotter ();
- protected:
-
- void initialize (void);
- void terminate (void);
-
- int _maybe_output_image (void);
-
- bool z_interlace;
- bool z_transparent;
- plColor z_transparent_color;
- };
- #endif
- class GIFPlotter : public Plotter
- {
- private:
-
- GIFPlotter (const GIFPlotter& oldplotter);
- GIFPlotter& operator= (const GIFPlotter& oldplotter);
- public:
-
- GIFPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- GIFPlotter (FILE *outfile);
- GIFPlotter (istream& in, ostream& out, ostream& err);
- GIFPlotter (ostream& out);
- GIFPlotter ();
-
- GIFPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- GIFPlotter (FILE *outfile, PlotterParams ¶ms);
- GIFPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- GIFPlotter (ostream& out, PlotterParams ¶ms);
- GIFPlotter (PlotterParams ¶ms);
-
- virtual ~GIFPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
-
- unsigned char _i_new_color_index (int red, int green, int blue);
- int _i_scan_pixel (void);
- void _i_delete_image (void);
- void _i_draw_elliptic_arc (plPoint p0, plPoint p1, plPoint pc);
- void _i_draw_elliptic_arc_2 (plPoint p0, plPoint p1, plPoint pc);
- void _i_draw_elliptic_arc_internal (int xorigin, int yorigin, unsigned int squaresize_x, unsigned int squaresize_y, int startangle, int anglerange);
- void _i_new_image (void);
- void _i_set_bg_color (void);
- void _i_set_fill_color (void);
- void _i_set_pen_color (void);
- void _i_start_scan (void);
- void _i_write_gif_header (void);
- void _i_write_gif_image (void);
- void _i_write_gif_trailer (void);
- void _i_write_short_int (unsigned int i);
-
- int i_xn, i_yn;
- int i_num_pixels;
- bool i_animation;
- int i_iterations;
- int i_delay;
- bool i_interlace;
- bool i_transparent;
- plColor i_transparent_color;
- void * i_arc_cache_data;
- int i_transparent_index;
- void * i_painted_set;
- void * i_canvas;
- plColor i_colormap[256];
- int i_num_color_indices;
- bool i_frame_nonempty;
- int i_bit_depth;
- int i_pixels_scanned;
- int i_pass;
- plIntPoint i_hot;
- plColor i_global_colormap[256];
- int i_num_global_color_indices;
- bool i_header_written;
- };
- #ifndef X_DISPLAY_MISSING
- class XDrawablePlotter : public Plotter
- {
- private:
-
- XDrawablePlotter (const XDrawablePlotter& oldplotter);
- XDrawablePlotter& operator= (const XDrawablePlotter& oldplotter);
- public:
-
- XDrawablePlotter (FILE *infile, FILE *outfile, FILE *errfile);
- XDrawablePlotter (FILE *outfile);
- XDrawablePlotter (istream& in, ostream& out, ostream& err);
- XDrawablePlotter (ostream& out);
- XDrawablePlotter ();
-
- XDrawablePlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- XDrawablePlotter (FILE *outfile, PlotterParams ¶ms);
- XDrawablePlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- XDrawablePlotter (ostream& out, PlotterParams ¶ms);
- XDrawablePlotter (PlotterParams ¶ms);
-
- virtual ~XDrawablePlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- bool flush_output (void);
- bool path_is_flushable (void);
- void push_state (void);
- void pop_state (void);
- void paint_point (void);
- void initialize (void);
- void terminate (void);
- void paint_path (void);
- bool paint_paths (void);
- void maybe_prepaint_segments (int prev_num_segments);
- double paint_text_string (const unsigned char *s, int h_just, int v_just);
- double get_text_width (const unsigned char *s);
- bool retrieve_font (void);
-
- virtual void _maybe_get_new_colormap (void);
- virtual void _maybe_handle_x_events (void);
-
- bool _x_retrieve_color (XColor *rgb_ptr);
- bool _x_select_font_carefully (const char *name, const unsigned char *s, bool subsetting);
- bool _x_select_xlfd_font_carefully (const char *x_name, const char *x_name_alt, const char *x_name_alt2, const char *x_name_alt3);
- void _x_add_gcs_to_first_drawing_state (void);
- void _x_delete_gcs_from_first_drawing_state (void);
- void _x_draw_elliptic_arc (plPoint p0, plPoint p1, plPoint pc);
- void _x_draw_elliptic_arc_2 (plPoint p0, plPoint p1, plPoint pc);
- void _x_draw_elliptic_arc_internal (int xorigin, int yorigin, unsigned int squaresize_x, unsigned int squaresize_y, int startangle, int anglerange);
- void _x_set_attributes (int x_gc_type);
- void _x_set_bg_color (void);
- void _x_set_fill_color (void);
- void _x_set_pen_color (void);
-
- Display *x_dpy;
- Visual *x_visual;
- Drawable x_drawable1;
- Drawable x_drawable2;
- Drawable x_drawable3;
- int x_double_buffering;
- long int x_max_polyline_len;
- plXFontRecord *x_fontlist;
- plColorRecord *x_colorlist;
- Colormap x_cmap;
- int x_cmap_type;
- bool x_colormap_warning_issued;
- bool x_bg_color_warning_issued;
- int x_paint_pixel_count;
- };
- class XPlotter : public XDrawablePlotter
- {
- private:
-
- XPlotter (const XPlotter& oldplotter);
- XPlotter& operator= (const XPlotter& oldplotter);
- public:
-
- XPlotter (FILE *infile, FILE *outfile, FILE *errfile);
- XPlotter (FILE *outfile);
- XPlotter (istream& in, ostream& out, ostream& err);
- XPlotter (ostream& out);
- XPlotter ();
-
- XPlotter (FILE *infile, FILE *outfile, FILE *errfile, PlotterParams ¶ms);
- XPlotter (FILE *outfile, PlotterParams ¶ms);
- XPlotter (istream& in, ostream& out, ostream& err, PlotterParams ¶ms);
- XPlotter (ostream& out, PlotterParams ¶ms);
- XPlotter (PlotterParams ¶ms);
-
- virtual ~XPlotter ();
- protected:
-
- bool begin_page (void);
- bool erase_page (void);
- bool end_page (void);
- void initialize (void);
- void terminate (void);
-
- void _maybe_get_new_colormap (void);
- void _maybe_handle_x_events (void);
-
- void _y_set_data_for_quitting (void);
-
- XtAppContext y_app_con;
- Widget y_toplevel;
- Widget y_canvas;
- Drawable y_drawable4;
- bool y_auto_flush;
- bool y_vanish_on_delete;
- pid_t *y_pids;
- int y_num_pids;
- int y_event_handler_count;
-
- static XPlotter **_xplotters;
- static int _xplotters_len;
- };
- #endif
- #endif
- #ifndef _PL_LIBPLOT_USEFUL_DEFS
- #define _PL_LIBPLOT_USEFUL_DEFS 1
- enum
- { M_NONE, M_DOT, M_PLUS, M_ASTERISK, M_CIRCLE, M_CROSS,
- M_SQUARE, M_TRIANGLE, M_DIAMOND, M_STAR, M_INVERTED_TRIANGLE,
- M_STARBURST, M_FANCY_PLUS, M_FANCY_CROSS, M_FANCY_SQUARE,
- M_FANCY_DIAMOND, M_FILLED_CIRCLE, M_FILLED_SQUARE, M_FILLED_TRIANGLE,
- M_FILLED_DIAMOND, M_FILLED_INVERTED_TRIANGLE, M_FILLED_FANCY_SQUARE,
- M_FILLED_FANCY_DIAMOND, M_HALF_FILLED_CIRCLE, M_HALF_FILLED_SQUARE,
- M_HALF_FILLED_TRIANGLE, M_HALF_FILLED_DIAMOND,
- M_HALF_FILLED_INVERTED_TRIANGLE, M_HALF_FILLED_FANCY_SQUARE,
- M_HALF_FILLED_FANCY_DIAMOND, M_OCTAGON, M_FILLED_OCTAGON
- };
- enum
- {
- O_ARC = 'a',
- O_CIRCLE = 'c',
- O_CONT = 'n',
- O_ERASE = 'e',
- O_LABEL = 't',
- O_LINEMOD = 'f',
- O_LINE = 'l',
- O_MOVE = 'm',
- O_POINT = 'p',
- O_SPACE = 's',
-
- O_ALABEL = 'T',
- O_ARCREL = 'A',
- O_BEZIER2 = 'q',
- O_BEZIER2REL = 'r',
- O_BEZIER3 = 'y',
- O_BEZIER3REL = 'z',
- O_BGCOLOR = '~',
- O_BOX = 'B',
- O_BOXREL = 'H',
- O_CAPMOD = 'K',
- O_CIRCLEREL = 'G',
- O_CLOSEPATH = 'k',
- O_CLOSEPL = 'x',
- O_COMMENT = '#',
- O_CONTREL = 'N',
- O_ELLARC = '?',
- O_ELLARCREL = '/',
- O_ELLIPSE = '+',
- O_ELLIPSEREL = '=',
- O_ENDPATH = 'E',
- O_ENDSUBPATH = ']',
- O_FILLTYPE = 'L',
- O_FILLCOLOR = 'D',
- O_FILLMOD = 'g',
- O_FONTNAME = 'F',
- O_FONTSIZE = 'S',
- O_JOINMOD = 'J',
- O_LINEDASH = 'd',
- O_LINEREL = 'I',
- O_LINEWIDTH = 'W',
- O_MARKER = 'Y',
- O_MARKERREL = 'Z',
- O_MOVEREL = 'M',
- O_OPENPL = 'o',
- O_ORIENTATION = 'b',
- O_PENCOLOR = '-',
- O_PENTYPE = 'h',
- O_POINTREL = 'P',
- O_RESTORESTATE= 'O',
- O_SAVESTATE = 'U',
- O_SPACE2 = ':',
- O_TEXTANGLE = 'R',
- O_FARC = '1',
- O_FARCREL = '2',
- O_FBEZIER2 = '`',
- O_FBEZIER2REL = '\'',
- O_FBEZIER3 = ',',
- O_FBEZIER3REL = '.',
- O_FBOX = '3',
- O_FBOXREL = '4',
- O_FCIRCLE = '5',
- O_FCIRCLEREL = '6',
- O_FCONT = ')',
- O_FCONTREL = '_',
- O_FELLARC = '}',
- O_FELLARCREL = '|',
- O_FELLIPSE = '{',
- O_FELLIPSEREL = '[',
- O_FFONTSIZE = '7',
- O_FLINE = '8',
- O_FLINEDASH = 'w',
- O_FLINEREL = '9',
- O_FLINEWIDTH = '0',
- O_FMARKER = '!',
- O_FMARKERREL = '@',
- O_FMOVE = '$',
- O_FMOVEREL = '%',
- O_FPOINT = '^',
- O_FPOINTREL = '&',
- O_FSPACE = '*',
- O_FSPACE2 = ';',
- O_FTEXTANGLE = '(',
- O_FCONCAT = '\\',
- O_FMITERLIMIT = 'i',
- O_FSETMATRIX = 'j'
- };
- #endif
- #endif
|