DXF entity base class. More...
#include <mydxfentities.hpp>

Public Member Functions | |
virtual | ~MyDXFEntity () |
Virtual destructor. More... | |
virtual MyDXFEntity * | copy (void) const =0 |
Get a new copy of entity. More... | |
virtual void | explode (class MyDXFEntities *ent, MyDXFFile *dxf, const Transformation *t) const =0 |
Explode into entities. More... | |
virtual void | write (class MyDXFFile *dxf, std::ofstream &ostr)=0 |
Write dxf file to stream. More... | |
virtual void | scale (class MyDXFFile *dxf, double s)=0 |
Scale entity by factor s. More... | |
virtual void | translate (class MyDXFFile *dxf, const Vec3D &dx)=0 |
Translate entity by dx. More... | |
virtual void | rotate_z (class MyDXFFile *dxf, double a)=0 |
Rotate entity around origin. More... | |
void | set_layer (const std::string &layer) |
Set layer. More... | |
std::string | get_layer (void) const |
Get layer. More... | |
virtual EntityType | get_type (void) const =0 |
Get entity type. More... | |
void | set_handle (const std::string &handle) |
Set entity handle. More... | |
std::string | get_handle (void) const |
Get entity handle. More... | |
virtual void | plot (const class MyDXFFile *dxf, cairo_t *cairo, const Transformation *t, const double range[4]) const =0 |
Plot entity with cairo. More... | |
virtual void | get_bbox (Vec3D &min, Vec3D &max, const class MyDXFFile *dxf, const Transformation *t) const =0 |
Return bounding box of entity. More... | |
virtual void | debug_print (std::ostream &os) const =0 |
Print debugging information to stream os. More... | |
Protected Member Functions | |
void | write_common (class MyDXFFile *dxf, std::ofstream &ostr) |
void | process_group (class MyDXFFile *dxf) |
void | constructor_debug_print (void) const |
void | debug_print_base (std::ostream &os) const |
Static Protected Member Functions | |
static void | bbox_ppoint (Vec3D &min, Vec3D &max, const Vec3D &p) |
Propose a point to bounding box. More... | |
Protected Attributes | |
std::string | _handle |
std::string | _layer |
Friends | |
std::ostream & | operator<< (std::ostream &os, const MyDXFEntity &ent) |
Detailed Description
DXF entity base class.
A general base class for all DXF entities. Contains data fields common to all entities.
Constructor & Destructor Documentation
◆ ~MyDXFEntity()
|
inlinevirtual |
Virtual destructor.
Member Function Documentation
◆ bbox_ppoint()
Propose a point to bounding box.
Updates bounding box value at min and max by including point p in the bounding box.
◆ copy()
|
pure virtual |
Get a new copy of entity.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ debug_print()
|
pure virtual |
Print debugging information to stream os.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ explode()
|
pure virtual |
Explode into entities.
Break entity into atomic entities and tranform the entities with tranformation t. Add the tranformed entities to the database ent.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ get_bbox()
|
pure virtual |
Return bounding box of entity.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ get_handle()
|
inline |
Get entity handle.
◆ get_layer()
|
inline |
Get layer.
◆ get_type()
|
pure virtual |
Get entity type.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ plot()
|
pure virtual |
Plot entity with cairo.
Plot the entity using the transformation t from the object space to cairo coordinates. The visible range is specified by range (xmin,ymin,xmax,ymax) in cairo coordinates.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ rotate_z()
|
pure virtual |
Rotate entity around origin.
Rotate for a radians.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ scale()
|
pure virtual |
Scale entity by factor s.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ set_handle()
|
inline |
Set entity handle.
◆ set_layer()
|
inline |
Set layer.
◆ translate()
Translate entity by dx.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
◆ write()
|
pure virtual |
Write dxf file to stream.
Implemented in MyDXFSpline, MyDXFMText, MyDXFLWPolyline, MyDXFLine, MyDXFInsert, MyDXFCircle, and MyDXFArc.
The documentation for this class was generated from the following files: