WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
Hpgl.h
1#ifndef _WINC_HPGL
2#define _WINC_HPGL
3
4#include <WXP/Device.h>
5#include <WXP/File.h>
6#include <WXP/GeomBox.h>
7#include <WXP/Image.h>
8#include <WXP/Listener.h>
9#include <WXP/Point.h>
10#include <WXP/Points.h>
11#include <WXP/Rect.h>
12#include <WXP/String.h>
13
14namespace WXP {
15 class Hpgl : public Device, public Listener {
16 File file;
17 bool inverse;
18 float width, height;
19 float x, y;
20 int fixed;
21 bool icon;
22 bool opened;
23 char name[30];
24 char filename[60];
25 char title[60];
26
27 int append;
28 int pcl;
29 int color;
30 int rotate;
31 float scale;
32
33 int fore_color;
34 int back_color;
35
36 GeomBox clip;
37
38 float base_width;
39 int line_bold;
40
41 int line_color;
42 int line_style;
43 float line_width;
44
45 int text_color;
46 float text_width;
47
48 int fill_color;
49 int fill_style;
50
51 int mark_color;
52 float mark_width;
53
54 public:
55 Hpgl();
56 ~Hpgl();
57 int init();
58 int setParam( const char *str );
59 int open();
60 int getDevice( String &str );
61 int resize(float rwidth, float rheight);
62 int manage();
63 int unmanage();
64 int addCallback( const char *event, Listener *list, const void *data );
65 int doCallback( const char *ev_str, const char *ev_data );
66 void callback( const char *ev_str, const char *ev_data, const void *data );
67 int close();
68 int setFocus();
69 int unsetFocus();
70 int update();
71 int clear();
72 int clearRect( Rect &rect );
73 int setTitle(const char *str);
74 int setIcon(bool val);
75 int setFixed(bool val);
76 int setInverse(bool val);
77 bool getInverse();
78 int setBackground(const char *str);
79 int setSize(float rwidth, float rheight);
80 int getSize(float &width, float &height);
81 inline float getWidth(){ return width; };
82 inline float getHeight(){ return height; };
83 int setOffset(float rx, float ry);
84 int getOffset(float &x, float &y);
85 int getCoords( Rect &rect );
86 Rect getCoords();
87 int allocColor( float red, float grn, float blu );
88 int setColor( int type, int ind );
89 int outputColor( int color );
90 int setLineWidth( int type, float width );
91 int setLineStyle( int type, int style );
92 int setFillStyle( int type, int style );
93 int drawLine( int type, float x1, float y1, float x2, float y2 );
94 int drawLine( int type, Points &pts );
95 int drawFill( int type, Points &pts );
96 int setImageAlign( int h, int v );
97 int drawImage( Image &image, float x, float y );
98 int drawImage( Image &image, int color, float x, float y );
99 int getImage( Image &image );
100 int setFont( const char *name );
101 int setTextAlign( int h, int v );
102 int drawText( Point &pt, const char *str );
103 Rect getClip();
104 int setClip( float x1, float y1, float x2, float y2 );
105 int setClip( Rect rect );
106 int setCursor( int type );
107 int copyFrame( int dest, int src );
108 int displayFrame( int ind );
109 int clearFrame( int ind );
110 int newFrame( int ind );
111 int newFrame();
112 bool isLooping();
113 int getFrame();
114 int setFrame( int ind );
115 int deleteFrame( int ind );
116 int incFrame( int step );
117 int getNumFrames();
118 int message( const char *str );
119 int bell( int len );
120 };
121}
122#endif
This virtual class defines methods for output to generic device.
Definition: Device.h:19
This class accesses files.
Definition: File.h:15
This structure sets size and location of a geometric box.
Definition: GeomBox.h:5
This class plots to HPGL printers.
Definition: Hpgl.h:15
This class defines an image.
Definition: Image.h:19
This virtual class defines the callback method for use with plotting.
Definition: Listener.h:11
This class creates an array a 2D points (x, y)
Definition: Points.h:8
This is a variable length string class.
Definition: String.h:5
All WXP classes fall under the WXP namespace.
Definition: Angle.h:4
This struct sets a 3D point (x, y, z)
Definition: Point.h:5
This structure defines rectangle coordinates.
Definition: Rect.h:5