]> Shamusworld >> Repos - architektonas/blobdiff - src/base/line.h
Removed unnecessary RS_ prefix from classes and whatnot.
[architektonas] / src / base / line.h
index 695bec7276ee79116c0f16aa6224572f246f9630..816472b49a58e4e2a35b8d3bcc1962fbba69d623 100644 (file)
@@ -6,24 +6,19 @@
 /**
  * Holds the data that defines a line.
  */
-class RS_LineData
+class LineData
 {
        public:
                /**
                * Default constructor. Leaves the data object uninitialized.
                */
-               RS_LineData() {}
+               LineData() {}
+               LineData(const Vector & start, const Vector & end): startpoint(start), endpoint(end) {}
 
-               RS_LineData(const Vector & start, const Vector & end): startpoint(start), endpoint(end)
-               {
-//                     this->startpoint = startpoint;
-//                     this->endpoint = endpoint;
-               }
-
-               friend class RS_Line;
-               friend class RS_ActionDrawLine;
+               friend class Line;
+               friend class ActionDrawLine;
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_LineData & ld)
+               friend std::ostream & operator<<(std::ostream & os, const LineData & ld)
                {
                        os << "(" << ld.startpoint << "/" << ld.endpoint << ")";
                        return os;
@@ -39,18 +34,16 @@ class RS_LineData
  *
  * @author Andrew Mustun
  */
-class RS_Line: public RS_AtomicEntity
+class Line: public AtomicEntity
 {
        public:
-               //RS_Line(RS_EntityContainer* parent);
-               //RS_Line(const RS_Line& l);
-               RS_Line(RS_EntityContainer * parent, const RS_LineData & d);
-               virtual ~RS_Line();
+               Line(EntityContainer * parent, const LineData & d);
+               virtual ~Line();
 
-               virtual RS_Entity * clone();
+               virtual Entity * clone();
                virtual RS2::EntityType rtti() const;
                virtual bool isEdge() const;
-               RS_LineData getData() const;
+               LineData getData() const;
 
                virtual VectorSolutions getRefPoints();
                virtual Vector getStartpoint() const;
@@ -73,14 +66,14 @@ class RS_Line: public RS_AtomicEntity
 
                virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestPointOnEntity(const Vector & coord,
-                       bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL);
+                       bool onEntity = true, double * dist = NULL, Entity ** entity = NULL);
                virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
                virtual Vector getNearestDist(double distance, bool startp);
                //virtual Vector getNearestRef(const Vector& coord, double* dist = NULL);
                virtual double getDistanceToPoint(const Vector & coord,
-                       RS_Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone,
+                       Entity ** entity = NULL, RS2::ResolveLevel level = RS2::ResolveNone,
                        double solidDist = RS_MAXDOUBLE);
 
                virtual void move(Vector offset);
@@ -91,12 +84,12 @@ class RS_Line: public RS_AtomicEntity
                virtual void moveRef(const Vector & ref, const Vector & offset);
                virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
 
-               friend std::ostream & operator<<(std::ostream & os, const RS_Line & l);
+               friend std::ostream & operator<<(std::ostream & os, const Line & l);
 
                virtual void calculateBorders();
 
        protected:
-               RS_LineData data;
+               LineData data;
 };
 
 #endif