Go to the first, previous, next, last section, table of contents.


EZDObject -- Interface to EZD Object

SYNOPSIS

#include <CNCL/EZDObject>

TYPE

CN_EZDOBJECT

BASE CLASSES

EZD

DERIVED CLASSES

EZDQueue, EZDServer, EZDText, EZDTimer

RELATED CLASSES

EZDDrawing, EZDPushButton, EZDWindow

DESCRIPTION


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);
Initializes the EZD-object with either name "obj" or &name. (x,y) are the object's minimum coordinates.


Public accessible members:

int x();
Returns the EZDObject's x coordinate.
int x(int vx);
Returns the EZDObject's old x coordinate and changes it to vx.
int y();
Returns the EZDObject's y coordinate.
int y(int vy);
Returns the 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/End object drawing" command. All drawing commands between 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");
Deletes the named drawing in the current object.
int get_lastxb(void);
int get_lastyb(void);
int get_lastxe(void);
int get_lastye(void);
Returns the object's last positions.
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 = "");
Basic drawing commands ( exact description see section 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();
Virtual redraw function ( has to be implemented by derived objects ).


Go to the first, previous, next, last section, table of contents.