13 #include <X11/Xutil.h>
15 #include <X11/Intrinsic.h>
18 #include <mix/Exceptions.h>
19 #include <zm/ZTypes.h>
38 ZPoint (
int x_coord,
int y_coord);
41 operator XPoint ()
const;
43 void add_offset (
const ZSize& zsize);
44 void sub_offset (
const ZSize& zsize);
46 void print (
const char* szEnd =
"\n")
const;
48 bool operator== (
const ZPoint& zpoint)
const;
49 bool operator!= (
const ZPoint& zpoint)
const;
66 ZSize (
int width,
int height);
69 virtual Logic inside (
const ZPoint& zpoint)
const;
70 virtual operator XRectangle ()
const;
72 void difference (
const ZPoint& zpoint1,
const ZPoint& zpoint2);
74 void print (
const char* szEnd =
"\n")
const;
76 bool operator== (
const ZSize& zsize)
const;
77 bool operator!= (
const ZSize& zsize)
const;
94 ZCorner zcorner = zcLeftTop);
99 virtual void move (
const ZPoint& zpoint,
100 ZCorner zcorner = zcLeftTop);
103 virtual Logic inside (
const ZPoint& zpoint)
const;
105 virtual operator XRectangle ()
const;
107 void print (
const char* szEnd =
"\n")
const;
109 bool operator== (
const ZRect& zrect)
const;
110 bool operator!= (
const ZRect& zrect)
const;
131 void x_error (
int code)
const;
134 ZRect rect (Drawable drawable)
const;
137 virtual ZRect rect ()
const;
140 int depth (Drawable drawable)
const;
143 Window root_wid ()
const;
146 ColorPixel white ()
const;
147 ColorPixel black ()
const;
148 ColorPixel color (
const char* szColorName)
const;
167 void draw_text (Drawable
id,
int x,
int y,
int attachment,
168 const char* szText)
const;
171 void draw_text (Drawable
id,
const ZRect& box,
int alignment,
172 const char* szText)
const;
183 virtual void expose ();
186 void set_foreground (
const char* szColorName);
187 void set_foreground (ColorPixel cp);
188 ColorPixel get_foreground ()
const;
189 const char* get_foreground_name ()
const;
191 void set_background (
const char* szColorName);
192 void set_background (ColorPixel cp);
193 ColorPixel get_background ()
const;
194 const char* get_background_name ()
const;
197 void assign (
const ZGEnv& zgenv);
199 void set_line_width (
int new_width);
200 int get_line_width ()
const;
202 void set_line_style (
int new_style,
int dash = 3,
int hole = 3);
203 int get_line_style ()
const;
205 void set_font (
const char* szFontName);
206 void set_font_as (
const ZGEnv& zgenv);
207 Font get_font ()
const;
208 const char* get_font_name ()
const;
211 int text_width (
const char* szText)
const;
212 int text_width (
int n)
const;
213 int text_height ()
const;
214 int text_ascent ()
const;
215 int text_descent ()
const;
218 ZRect text_rect (
int x,
int y,
int attachment,
219 const char* szText)
const;
223 virtual void changed_state (
int mask_of_changes);
244 virtual ZRect rect ()
const;
247 void draw_text (
int x,
int y,
int attachment,
248 const char* szText)
const;
251 void draw_text (
const ZRect& box,
int alignment,
252 const char* szText)
const;
269 virtual ZRect rect ()
const;
272 void draw_text (
int x,
int y,
int attachment,
273 const char* szText)
const;
276 void draw_text (
const ZRect& box,
int alignment,
277 const char* szText)
const;
299 void resize (
const ZSize& zsize);
304 #define AnyType XSegment
305 #define AnyAr XSegmentAr
306 #define AnyFormatSpec "\n%d: (%d,%d)-(%d,%d)"
307 #define AnyPrintList i, item.x1, item.y1, item.x2, item.y2
308 #include <mix/AnyAr.H>
323 virtual Widget widget ()
const;
348 extern "C" Logic RectMask (
float* x1p,
float* y1p,
349 float* x2p,
float* y2p,
350 float xr,
float yr,
float wr,
float hr);
356 extern "C" float DistanceToLine (
int x,
int y,
357 int x1,
int y1,
int x2,
int y2);
ZGEnv & operator=(const ZGEnv &zgenv)
void write_tiff(const char *path, ZmImageRemarks *remarks=NULL)
void write_png(const char *path, ZmImageRemarks *remarks=NULL)