Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
DL_Attributes Class Reference

#include <dl_attributes.h>

Public Member Functions

 DL_Attributes ()
 DL_Attributes (const std::string &layer, int color, int width, const std::string &linetype, double linetypeScale)
 DL_Attributes (const std::string &layer, int color, int color24, int width, const std::string &linetype, int handle=-1)
void setLayer (const std::string &layer)
std::string getLayer () const
void setColor (int color)
void setColor24 (int color)
int getColor () const
int getColor24 () const
void setWidth (int width)
int getWidth () const
void setLinetype (const std::string &linetype)
void setLinetypeScale (double linetypeScale)
double getLinetypeScale () const
std::string getLinetype () const
void setHandle (int h)
int getHandle () const
void setInPaperSpace (bool on)
bool isInPaperSpace () const

Detailed Description

Storing and passing around attributes. Attributes are the layer name, color, width and line type.

Author
Andrew Mustun

Constructor & Destructor Documentation

◆ DL_Attributes() [1/3]

DL_Attributes::DL_Attributes ( )
inline

Default constructor.

◆ DL_Attributes() [2/3]

DL_Attributes::DL_Attributes ( const std::string & layer,
int color,
int width,
const std::string & linetype,
double linetypeScale )
inline

Constructor for DXF attributes.

Parameters
layerLayer name for this entity or NULL for no layer (every entity should be on a named layer!).
colorColor number (0..256). 0 = BYBLOCK, 256 = BYLAYER.
widthLine thickness. Defaults to zero. -1 = BYLAYER, -2 = BYBLOCK, -3 = default width
linetypeLine type name or "BYLAYER" or "BYBLOCK". Defaults to "BYLAYER"

◆ DL_Attributes() [3/3]

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
layerLayer name for this entity or NULL for no layer (every entity should be on a named layer!).
colorColor number (0..256). 0 = BYBLOCK, 256 = BYLAYER.
color2424 bit color (0x00RRGGBB, see DXF reference).
widthLine thickness. Defaults to zero. -1 = BYLAYER, -2 = BYBLOCK, -3 = default width
linetypeLine type name or "BYLAYER" or "BYBLOCK". Defaults to "BYLAYER"

Member Function Documentation

◆ getColor()

int DL_Attributes::getColor ( ) const
inline
Returns
Color.
See also
DL_Codes, dxfColors

◆ getColor24()

int DL_Attributes::getColor24 ( ) const
inline
Returns
24 bit color or -1 if no 24bit color is defined.
See also
DL_Codes, dxfColors

◆ getHandle()

int DL_Attributes::getHandle ( ) const
inline

◆ getLayer()

std::string DL_Attributes::getLayer ( ) const
inline
Returns
Layer name.

◆ getLinetype()

std::string DL_Attributes::getLinetype ( ) const
inline
Returns
Line type.

◆ getLinetypeScale()

double DL_Attributes::getLinetypeScale ( ) const
inline

◆ getWidth()

int DL_Attributes::getWidth ( ) const
inline
Returns
Width.

◆ isInPaperSpace()

bool DL_Attributes::isInPaperSpace ( ) const
inline

◆ setColor()

void DL_Attributes::setColor ( int color)
inline

Sets the color.

See also
DL_Codes, dxfColors

◆ setColor24()

void DL_Attributes::setColor24 ( int color)
inline

Sets the 24bit color.

See also
DL_Codes, dxfColors

◆ setHandle()

void DL_Attributes::setHandle ( int h)
inline

◆ setInPaperSpace()

void DL_Attributes::setInPaperSpace ( bool on)
inline

◆ setLayer()

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()

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.

◆ setLinetypeScale()

void DL_Attributes::setLinetypeScale ( double linetypeScale)
inline

Sets the entity specific line type scale.

◆ setWidth()

void DL_Attributes::setWidth ( int width)
inline

Sets the width.


The documentation for this class was generated from the following file: