mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Bazaar/DXF : added some missing setters to Entity class
git-svn-id: svn://ultimatepp.org/upp/trunk@5277 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ebcd401c53
commit
77ded3f8a2
2 changed files with 29 additions and 3 deletions
|
|
@ -62,3 +62,29 @@ double DXFEntity::R(double a) const
|
|||
{
|
||||
return entities->GetTransformationMatrix().R(a);
|
||||
}
|
||||
|
||||
// sets color
|
||||
DXFEntity &DXFEntity::SetColor(int c)
|
||||
{
|
||||
color = c;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// sets layer
|
||||
DXFEntity &DXFEntity::SetLayer(String const &l)
|
||||
{
|
||||
layer = l;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// sets linetype
|
||||
DXFEntity &DXFEntity::SetLineType(String const &l)
|
||||
{
|
||||
// linetype MUST be there, so add if not
|
||||
if(!GetDXF().tables.HasLineType(l))
|
||||
GetDXF().tables.AddLineType(l);
|
||||
|
||||
lineType = l;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,15 +61,15 @@ class DXFEntity
|
|||
virtual ~DXFEntity() {}
|
||||
|
||||
// gets/sets color
|
||||
DXFEntity *SetColor(int c);
|
||||
DXFEntity &SetColor(int c);
|
||||
int GetColor(void) const { return color; }
|
||||
|
||||
// gets/sets layer
|
||||
DXFEntity *SetLayer(String const &l);
|
||||
DXFEntity &SetLayer(String const &l);
|
||||
String const &GetLayer(void) const { return layer; }
|
||||
|
||||
// gets/sets linetype
|
||||
DXFEntity *SetLineType(String const &l);
|
||||
DXFEntity &SetLineType(String const &l);
|
||||
String const &GetLineType(void) const { return lineType; }
|
||||
|
||||
// gets bounding box of element
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue