![]() |
QCAD
Open Source 2D CAD
|
Storing and passing around attributes. More...
#include <dl_attributes.h>
Public Member Functions | |
DL_Attributes () | |
Default constructor. | |
DL_Attributes (const std::string &layer, int color, int color24, int width, const std::string &linetype, int handle=-1) | |
Constructor for DXF attributes. | |
DL_Attributes (const std::string &layer, int color, int width, const std::string &linetype, double linetypeScale) | |
Constructor for DXF attributes. | |
int | getColor () const |
int | getColor24 () const |
int | getHandle () const |
std::string | getLayer () const |
std::string | getLinetype () const |
double | getLinetypeScale () const |
int | getWidth () const |
bool | isInPaperSpace () const |
void | setColor (int color) |
Sets the color. | |
void | setColor24 (int color) |
Sets the 24bit color. | |
void | setHandle (int h) |
void | setInPaperSpace (bool on) |
void | setLayer (const std::string &layer) |
Sets the layer. | |
void | setLinetype (const std::string &linetype) |
Sets the line type. | |
void | setLinetypeScale (double linetypeScale) |
Sets the entity specific line type scale. | |
void | setWidth (int width) |
Sets the width. | |
Private Attributes | |
int | color |
int | color24 |
int | handle |
bool | inPaperSpace |
std::string | layer |
std::string | linetype |
double | linetypeScale |
int | width |
Storing and passing around attributes.
Attributes are the layer name, color, width and line type.
|
inline |
Default constructor.
|
inline |
Constructor for DXF attributes.
layer | Layer name for this entity or NULL for no layer (every entity should be on a named layer!). |
color | Color number (0..256). 0 = BYBLOCK, 256 = BYLAYER. |
width | Line thickness. Defaults to zero. -1 = BYLAYER, -2 = BYBLOCK, -3 = default width |
linetype | Line type name or "BYLAYER" or "BYBLOCK". Defaults to "BYLAYER" |
|
inline |
Constructor for DXF attributes.
layer | Layer name for this entity or NULL for no layer (every entity should be on a named layer!). |
color | Color number (0..256). 0 = BYBLOCK, 256 = BYLAYER. |
color24 | 24 bit color (0x00RRGGBB, see DXF reference). |
width | Line thickness. Defaults to zero. -1 = BYLAYER, -2 = BYBLOCK, -3 = default width |
linetype | Line type name or "BYLAYER" or "BYBLOCK". Defaults to "BYLAYER" |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the layer.
If the given pointer points to NULL, the new layer name will be an empty but valid string.
|
inline |
Sets the line type.
This can be any string and is not checked to be a valid line type.
|
inline |
Sets the entity specific line type scale.
|
inline |
Sets the width.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |