UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
XGOps.H
1 // XGOps.H $Revision: 1.3 $ $Date: 1998/05/13 16:00:00 $
2 
3 #if !defined __XGOps_H
4 
5 #define __XGOps_H
6 
7 
8 #include <zm/XGEnv.H>
9 
10 
11 // Text attachements
12 #define AttachRight 0x01
13 #define AttachLeft 0x00
14 #define AttachTop 0x02
15 #define AttachBottom 0x00
16 
17 // Shape of text's rectangle
18 enum TextShape
19 {
20  TextTopY,
21  TextBottomY,
22  TextLeftX,
23  TextRightX
24  };
25 
26 
27 /*************************************************************
28  * X Graphic Operations
29  *************************************************************/
30 
31 class XGOps : public XGEnv
32 {
33 public:
34 
35  XGOps (const XDO& xdo);
36 
37  // Drawing operations
38  virtual void draw_line (int x1, int y1, int x2, int y2);
39  virtual void draw_rect1 (int x1, int y1, int w, int h);
40  virtual void draw_rect2 (int x1, int y1, int x2, int y2);
41  virtual void draw_point (int x, int y);
42  virtual void fill_rect1 (int x1, int y1, int w, int h);
43  virtual void fill_rect2 (int x1, int y1, int x2, int y2);
44 
45  // Text and font characteristics
46  int text_width (const char* szText) const;
47  int text_width (int n) const;
48  int text_height () const;
49  // Get shape of text's rectangle
50  int text_shape (TextShape ts, int x, int y, int attachment,
51  const char* szText) const;
52 
53  // Draw attached text
54  virtual void draw_text (int x, int y, int attachment,
55  const char* szText) const;
56 };
57 
58 #endif // XGOps.H
Definition: XGEnv.H:18
Definition: XDO.H:16
Definition: XGOps.H:31