|
|
Listing 2 : Additional
features of the data structures necessary to support erase
|
struct drawableStruct
{
Area area;
int color;
DrawableType type;
Container *parentPtr;
Drawable *nextContainedPtr;
Boolean dirty;
Drawable *nextDirtyDrawablePtr;
Container *oldParentPtr;
Area oldArea;
};
struct boxStruct
{
Drawable drawable;
Boolean filled;
int fillColor;
Boolean oldFilled;
};
struct circleStruct
{
Drawable drawable;
};
struct lineStruct
{
Drawable drawable;
int x1;
int y1;
int x2;
int y2;
int oldX1;
int oldY1;
int oldX2;
int oldY2;
};
struct textStruct
{
Drawable drawable;
char *string;
};
struct containerStruct
{
Drawable drawable;
Drawable *containedListPtr;
/*
The absolute location is maintained to optimize drawing the
contained objects.
*/
int absoluteLeft;
int absoluteTop;
Boolean visible;
};
|
Back
|
|
|
|
|