#include <CNCL/EZDObject>
CN_EZDOBJECT
EZD
EZDQueue, EZDServer, EZDText, EZDTimer
EZDDrawing, EZDPushButton, EZDWindow
EZDObject
provides an interface to the objects of Easy Draw.
Thus the drawings in all derived classes are handled as objects.
Constructors:
EZDObject();
EZDObject(CNParam *param);
EZDObject(int x, int y);
EZDObject(const CNStringR name, int x, int y);
&name
. (x,y)
are the object's minimum coordinates.
Public accessible members:
int x();
EZDObject
's x coordinate.
int x(int vx);
EZDObject
's old x coordinate and changes it to
vx
.
int y();
EZDObject
's y coordinate.
int y(int vy);
EZDObject
's old y coordinate and changes it to
vy
.
In addition to the member functions required by CNCL, EZDObject
provides:
void start();
void start(const CNStringR object_name);
void end();
start()
and end()
draw the named object in the current
drawing. If the named object already exists in the current drawing, it
is replaced by the new one. If no drawing commands are specified between
start()
and end()
, the drawing still exists, but with no
graphical representation.
void delete_obj(const CNStringR draw_name = "draw");
int get_lastxb(void);
int get_lastyb(void);
int get_lastxe(void);
int get_lastye(void);
void point(int x, int y, const CNStringR col);
void line(int x1, int y1, int x2, int y2, const CNStringR col, int width = -1);
void arc(int x, int y, int w, int h, int a1, int a2, const CNStringR col, int width = -1);
void fill_arc(int x, int y, int w, int h, int a1, int a2, const CNStringR col);
void pie_arc(int x, int y, int w, int h, int a1, int a2, const CNStringR col);
void rectangle(int x, int y, int w, int h, const CNStringR col, int width = -1);
void fill_rectangle(int x, int y, int w, int h, const CNStringR col);
void text(int x, int y, const CNStringR text, const CNStringR col, const CNStringR font);
void text(int x, int y, int w, int h, CNString align, CNStringR text,
CNStringR col, CNStringR font);
void bitmap(int x, int y, int w, int h, CNStringR filename, CNStringR &color1 = "black",
CNStringR color2 = "");
void bitmap(int x, int y, CNStringR filename, CNStringR color1 = "black",
CNStringR color2 = "");
EZD
or
EZD's man pages). The command's (x,y)
coordinates determine the
position in the object. For the position in the current drawing the
object's coordinates (ox,oy)
are added automatically.
virtual void redraw();
Go to the first, previous, next, last section, table of contents.