/**
* Holds the data that defines a hatch entity.
*/
-class RS_HatchData
+class HatchData
{
public:
/**
* Default constructor. Leaves the data object uninitialized.
*/
- RS_HatchData() {}
+ HatchData() {}
/**
* @param solid true: solid fill, false: pattern.
* @param scale Pattern scale or spacing.
* @param pattern Pattern name.
*/
- RS_HatchData(bool solid, double scale, double angle, const QString & pattern)
+ HatchData(bool solid, double scale, double angle, const QString & pattern)
{
this->solid = solid;
this->scale = scale;
//std::cout << "RS_H__atchData: " << pattern.latin1() << "\n";
}
- friend std::ostream & operator<<(std::ostream & os, const RS_HatchData & td)
+ friend std::ostream & operator<<(std::ostream & os, const HatchData & td)
{
os << "(" << td.pattern.toAscii().data() << ")";
return os;
* @author James Hammons
* @author Andrew Mustun
*/
-class RS_Hatch: public RS_EntityContainer
+class Hatch: public EntityContainer
{
public:
- RS_Hatch(RS_EntityContainer * parent, const RS_HatchData & d);
- virtual ~RS_Hatch();
+ Hatch(EntityContainer * parent, const HatchData & d);
+ virtual ~Hatch();
- virtual RS_Entity * clone();
+ virtual Entity * clone();
virtual RS2::EntityType rtti() const;
virtual bool isContainer() const;
- RS_HatchData getData() const;
+ HatchData getData() const;
bool validate();
int countLoops();
void activateContour(bool on);
virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
virtual double getLength();
- virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL,
+ virtual double getDistanceToPoint(const Vector & coord, Entity ** entity = NULL,
RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
virtual void move(Vector offset);
virtual void rotate(Vector center, double angle);
virtual void mirror(Vector axisPoint1, Vector axisPoint2);
virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
- friend std::ostream & operator<<(std::ostream & os, const RS_Hatch & p);
+ friend std::ostream & operator<<(std::ostream & os, const Hatch & p);
protected:
- RS_HatchData data;
- RS_EntityContainer * hatch;
+ HatchData data;
+ EntityContainer * hatch;
bool updateRunning;
bool needOptimization;
};