Storing and passing around attributes.
More...
#include <dl_attributes.h>
|
| DL_Attributes () |
| Default constructor.
|
|
| DL_Attributes (const std::string &layer, int color, int width, const std::string &linetype, double linetypeScale) |
| Constructor for DXF attributes. More...
|
|
| DL_Attributes (const std::string &layer, int color, int color24, int width, const std::string &linetype, int handle=-1) |
| Constructor for DXF attributes. More...
|
|
void | setLayer (const std::string &layer) |
| Sets the layer. More...
|
|
std::string | getLayer () const |
|
void | setColor (int color) |
| Sets the color. More...
|
|
void | setColor24 (int color) |
| Sets the 24bit color. More...
|
|
int | getColor () const |
|
int | getColor24 () const |
|
void | setWidth (int width) |
| Sets the width.
|
|
int | getWidth () const |
|
void | setLinetype (const std::string &linetype) |
| Sets the line type. More...
|
|
void | setLinetypeScale (double linetypeScale) |
| Sets the entity specific line type scale.
|
|
double | getLinetypeScale () const |
|
std::string | getLinetype () const |
|
void | setHandle (int h) |
|
int | getHandle () const |
|
void | setInPaperSpace (bool on) |
|
bool | isInPaperSpace () |
|
| DL_Attributes () |
| Default constructor.
|
|
| DL_Attributes (const std::string &layer, int color, int width, const std::string &linetype, double linetypeScale) |
| Constructor for DXF attributes. More...
|
|
| DL_Attributes (const std::string &layer, int color, int color24, int width, const std::string &linetype, int handle=-1) |
| Constructor for DXF attributes. More...
|
|
void | setLayer (const std::string &layer) |
| Sets the layer. More...
|
|
std::string | getLayer () const |
|
void | setColor (int color) |
| Sets the color. More...
|
|
void | setColor24 (int color) |
| Sets the 24bit color. More...
|
|
int | getColor () const |
|
int | getColor24 () const |
|
void | setWidth (int width) |
| Sets the width.
|
|
int | getWidth () const |
|
void | setLinetype (const std::string &linetype) |
| Sets the line type. More...
|
|
void | setLinetypeScale (double linetypeScale) |
| Sets the entity specific line type scale.
|
|
double | getLinetypeScale () const |
|
std::string | getLinetype () const |
|
void | setHandle (int h) |
|
int | getHandle () const |
|
void | setInPaperSpace (bool on) |
|
bool | isInPaperSpace () |
|
Storing and passing around attributes.
Attributes are the layer name, color, width and line type.
- Author
- Andrew Mustun
◆ DL_Attributes() [1/4]
DL_Attributes::DL_Attributes |
( |
const std::string & |
layer, |
|
|
int |
color, |
|
|
int |
width, |
|
|
const std::string & |
linetype, |
|
|
double |
linetypeScale |
|
) |
| |
|
inline |
Constructor for DXF attributes.
- Parameters
-
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" |
◆ DL_Attributes() [2/4]
DL_Attributes::DL_Attributes |
( |
const std::string & |
layer, |
|
|
int |
color, |
|
|
int |
color24, |
|
|
int |
width, |
|
|
const std::string & |
linetype, |
|
|
int |
handle = -1 |
|
) |
| |
|
inline |
Constructor for DXF attributes.
- Parameters
-
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 (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" |
◆ DL_Attributes() [3/4]
DL_Attributes::DL_Attributes |
( |
const std::string & |
layer, |
|
|
int |
color, |
|
|
int |
width, |
|
|
const std::string & |
linetype, |
|
|
double |
linetypeScale |
|
) |
| |
|
inline |
Constructor for DXF attributes.
- Parameters
-
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" |
◆ DL_Attributes() [4/4]
DL_Attributes::DL_Attributes |
( |
const std::string & |
layer, |
|
|
int |
color, |
|
|
int |
color24, |
|
|
int |
width, |
|
|
const std::string & |
linetype, |
|
|
int |
handle = -1 |
|
) |
| |
|
inline |
Constructor for DXF attributes.
- Parameters
-
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 (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" |
◆ getColor() [1/2]
int DL_Attributes::getColor |
( |
| ) |
const |
|
inline |
- Returns
- Color.
- See also
- DL_Codes, dxfColors
◆ getColor() [2/2]
int DL_Attributes::getColor |
( |
| ) |
const |
|
inline |
- Returns
- Color.
- See also
- DL_Codes, dxfColors
◆ getColor24() [1/2]
int DL_Attributes::getColor24 |
( |
| ) |
const |
|
inline |
- Returns
- 24 bit color or -1 if no 24bit color is defined.
- See also
- DL_Codes, dxfColors
◆ getColor24() [2/2]
int DL_Attributes::getColor24 |
( |
| ) |
const |
|
inline |
- Returns
- 24 bit color or -1 if no 24bit color is defined.
- See also
- DL_Codes, dxfColors
◆ getLayer() [1/2]
std::string DL_Attributes::getLayer |
( |
| ) |
const |
|
inline |
◆ getLayer() [2/2]
std::string DL_Attributes::getLayer |
( |
| ) |
const |
|
inline |
◆ getLinetype() [1/2]
std::string DL_Attributes::getLinetype |
( |
| ) |
const |
|
inline |
◆ getLinetype() [2/2]
std::string DL_Attributes::getLinetype |
( |
| ) |
const |
|
inline |
◆ getWidth() [1/2]
int DL_Attributes::getWidth |
( |
| ) |
const |
|
inline |
◆ getWidth() [2/2]
int DL_Attributes::getWidth |
( |
| ) |
const |
|
inline |
◆ setColor() [1/2]
void DL_Attributes::setColor |
( |
int |
color | ) |
|
|
inline |
Sets the color.
- See also
- DL_Codes, dxfColors
◆ setColor() [2/2]
void DL_Attributes::setColor |
( |
int |
color | ) |
|
|
inline |
Sets the color.
- See also
- DL_Codes, dxfColors
◆ setColor24() [1/2]
void DL_Attributes::setColor24 |
( |
int |
color | ) |
|
|
inline |
Sets the 24bit color.
- See also
- DL_Codes, dxfColors
◆ setColor24() [2/2]
void DL_Attributes::setColor24 |
( |
int |
color | ) |
|
|
inline |
Sets the 24bit color.
- See also
- DL_Codes, dxfColors
◆ setLayer() [1/2]
void DL_Attributes::setLayer |
( |
const std::string & |
layer | ) |
|
|
inline |
Sets the layer.
If the given pointer points to NULL, the new layer name will be an empty but valid string.
◆ setLayer() [2/2]
void DL_Attributes::setLayer |
( |
const std::string & |
layer | ) |
|
|
inline |
Sets the layer.
If the given pointer points to NULL, the new layer name will be an empty but valid string.
◆ setLinetype() [1/2]
void DL_Attributes::setLinetype |
( |
const std::string & |
linetype | ) |
|
|
inline |
Sets the line type.
This can be any string and is not checked to be a valid line type.
◆ setLinetype() [2/2]
void DL_Attributes::setLinetype |
( |
const std::string & |
linetype | ) |
|
|
inline |
Sets the line type.
This can be any string and is not checked to be a valid line type.
The documentation for this class was generated from the following file: