#include <DLShape.h>
Inheritance diagram for DLShape:
Constructors, Destructors & Operators | |
DLShape () | |
DLShape (const DLShape &orig) | |
virtual | ~DLShape () |
const DLShape & | operator= (const DLShape &right) |
Public Types | |
enum | DLLineStyle { DL_SOLID, DL_DASH } |
Public Member Functions | |
virtual void | dlDrawShape (DLImage *image)=0 |
Set Methods | |
void | dlSetLineColor (const DLColor &color) |
void | dlSetLineStyle (int thickness) |
void | dlSetLineThickness (int thickness) |
void | dlSetDashStyle (DLShape::DLLineStyle DashStyle) |
void | dlSetDashLength (int length) |
void | dlSetFillColor (const DLColor &color) |
void | dlSetFillOff () |
Get Methods | |
DLColor | dlGetLineColor (void) const |
int | dlGetLineStyle (void) const |
int | dlGetLineThickness (void) const |
DLShape::DLLineStyle | dlGetDashStyle (void) |
int | dlGetDashLength (void) |
DLColor | dlGetFillColor (void) |
Protected Attributes | |
DLColor | lineColor |
line color | |
DLColor | fillColor |
color used to fill shape when drawing | |
DLShape::DLLineStyle | lineStyle |
line style: dashed or solid | |
int | dashLength |
if dashed, length of dash | |
int | lineThickness |
the thickness of the drawing line | |
bool | fillShape |
It provides the common functions/interfaces that all derived shape objects must implement.
Definition at line 26 of file DLShape.h.
enum DLShape::DLLineStyle |
DLShape::DLShape | ( | ) |
Default DLShape Constructor
DLShape::DLShape | ( | const DLShape & | orig | ) |
virtual DLShape::~DLShape | ( | ) | [inline, virtual] |
Assignment operator
right | DLShape to be copied |
void DLShape::dlSetLineColor | ( | const DLColor & | color | ) |
Set the line color for drawing a shape onto a DLImage.
color | line color |
void DLShape::dlSetLineStyle | ( | int | thickness | ) | [inline] |
Set the thickness of the line used when drawing the shape onto a DLImage.
thickness | thickness of the line. Must be > 0 |
Definition at line 79 of file DLShape.h.
References DL_CRITICAL, and lineThickness.
void DLShape::dlSetLineThickness | ( | int | thickness | ) | [inline] |
void DLShape::dlSetDashStyle | ( | DLShape::DLLineStyle | DashStyle | ) | [inline] |
void DLShape::dlSetDashLength | ( | int | length | ) | [inline] |
Set the length of the dashes and spaces when line is dashed. Default is 5
length |
Definition at line 96 of file DLShape.h.
References dashLength.
void DLShape::dlSetFillColor | ( | const DLColor & | color | ) |
Set the fill color for the shape object. The fill color is used to fill in the interior of the shape when drawn onto a DLImage.
color | fill color |
void DLShape::dlSetFillOff | ( | ) | [inline] |
DLColor DLShape::dlGetLineColor | ( | void | ) | const [inline] |
int DLShape::dlGetLineStyle | ( | void | ) | const [inline] |
Get line thickness
Definition at line 127 of file DLShape.h.
References DL_CRITICAL, and lineThickness.
int DLShape::dlGetLineThickness | ( | void | ) | const [inline] |
Get line thickness
Definition at line 136 of file DLShape.h.
References lineThickness.
DLShape::DLLineStyle DLShape::dlGetDashStyle | ( | void | ) | [inline] |
int DLShape::dlGetDashLength | ( | void | ) | [inline] |
DLColor DLShape::dlGetFillColor | ( | void | ) | [inline] |
virtual void DLShape::dlDrawShape | ( | DLImage * | image | ) | [pure virtual] |
Draws the shape onto an image. Example:
DLImage i("test.tif"); DLRectShape box(5,5,30,50); box.dlDrawShape(&i);
image | DLImage to draw onto |
Implemented in DLLineShape, and DLRectShape.
DLColor DLShape::lineColor [protected] |
DLColor DLShape::fillColor [protected] |
color used to fill shape when drawing
Definition at line 173 of file DLShape.h.
Referenced by dlGetFillColor().
DLShape::DLLineStyle DLShape::lineStyle [protected] |
line style: dashed or solid
Definition at line 180 of file DLShape.h.
Referenced by dlGetDashStyle(), and dlSetDashStyle().
int DLShape::dashLength [protected] |
if dashed, length of dash
Definition at line 183 of file DLShape.h.
Referenced by dlGetDashLength(), and dlSetDashLength().
int DLShape::lineThickness [protected] |
the thickness of the drawing line
Definition at line 186 of file DLShape.h.
Referenced by dlGetLineStyle(), dlGetLineThickness(), dlSetLineStyle(), and dlSetLineThickness().
bool DLShape::fillShape [protected] |
A flag to indicate to the draw function whether to fill in the shape with the color indicated by fillColor when drawing the shape.
Definition at line 192 of file DLShape.h.
Referenced by dlSetFillOff().