X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Fbase%2Frs_entity.h;h=bd1060ec1d9ef2c44eb50f08c1a88045ed6757c4;hb=d774c2655ba2c3657a565f325411144452392277;hp=7764832ead6f708391134f0028d8e07d7b22fbaa;hpb=89e127aa3dbd74d3158e6dbe0ca1703420c04395;p=architektonas
diff --git a/src/base/rs_entity.h b/src/base/rs_entity.h
index 7764832..bd1060e 100644
--- a/src/base/rs_entity.h
+++ b/src/base/rs_entity.h
@@ -16,7 +16,7 @@ class RS_Circle;
class RS_Document;
class RS_EntityContainer;
class Drawing;
-class RS_GraphicView;
+class GraphicView;
class RS_Insert;
class RS_Line;
class RS_Point;
@@ -45,15 +45,15 @@ class RS_Entity: public RS_Undoable
unsigned long int getId() const;
/**
- * This method must be overwritten in subclasses and return the
- * number of atomic entities in this entity.
- */
+ * This method must be overwritten in subclasses and return the
+ * number of atomic entities in this entity.
+ */
virtual unsigned long int count() = 0;
/**
- * This method must be overwritten in subclasses and return the
- * number of atomic entities in this entity including sub containers.
- */
+ * This method must be overwritten in subclasses and return the
+ * number of atomic entities in this entity including sub containers.
+ */
virtual unsigned long int countDeep() = 0;
virtual double getLength();
@@ -74,15 +74,15 @@ class RS_Entity: public RS_Undoable
RS_Pen getPen(bool resolve = true) const;
/**
- * Must be overwritten to return true if an entity type
- * is a container for other entities (e.g. polyline, group, ...).
- */
+ * Must be overwritten to return true if an entity type
+ * is a container for other entities (e.g. polyline, group, ...).
+ */
virtual bool isContainer() const = 0;
/**
- * Must be overwritten to return true if an entity type
- * is an atomic entity.
- */
+ * Must be overwritten to return true if an entity type
+ * is an atomic entity.
+ */
virtual bool isAtomic() const = 0;
virtual bool isEdge() const;
@@ -119,59 +119,59 @@ class RS_Entity: public RS_Undoable
virtual VectorSolutions getRefPoints();
/**
- * Must be overwritten to get the closest endpoint to the
- * given coordinate for this entity.
- *
- * @param coord Coordinate (typically a mouse coordinate)
- * @param dist Pointer to a value which will contain the measured
- * distance between 'coord' and the closest endpoint. The passed
- * pointer can also be NULL in which case the distance will be
- * lost.
- *
- * @return The closest endpoint.
- */
+ * Must be overwritten to get the closest endpoint to the
+ * given coordinate for this entity.
+ *
+ * @param coord Coordinate (typically a mouse coordinate)
+ * @param dist Pointer to a value which will contain the measured
+ * distance between 'coord' and the closest endpoint. The passed
+ * pointer can also be NULL in which case the distance will be
+ * lost.
+ *
+ * @return The closest endpoint.
+ */
virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL) = 0;
/**
- * Must be overwritten to get the closest coordinate to the
- * given coordinate which is on this entity.
- *
- * @param coord Coordinate (typically a mouse coordinate)
- * @param dist Pointer to a value which will contain the measured
- * distance between \p coord and the point. The passed pointer can
- * also be \p NULL in which case the distance will be lost.
- *
- * @return The closest coordinate.
- */
+ * Must be overwritten to get the closest coordinate to the
+ * given coordinate which is on this entity.
+ *
+ * @param coord Coordinate (typically a mouse coordinate)
+ * @param dist Pointer to a value which will contain the measured
+ * distance between \p coord and the point. The passed pointer can
+ * also be \p NULL in which case the distance will be lost.
+ *
+ * @return The closest coordinate.
+ */
virtual Vector getNearestPointOnEntity(const Vector& /*coord*/,
bool onEntity = true, double * dist = NULL, RS_Entity ** entity = NULL) = 0;
/**
- * Must be overwritten to get the (nearest) center point to the
- * given coordinate for this entity.
- *
- * @param coord Coordinate (typically a mouse coordinate)
- * @param dist Pointer to a value which will contain the measured
- * distance between 'coord' and the closest center point. The passed
- * pointer can also be NULL in which case the distance will be
- * lost.
- *
- * @return The closest center point.
- */
+ * Must be overwritten to get the (nearest) center point to the
+ * given coordinate for this entity.
+ *
+ * @param coord Coordinate (typically a mouse coordinate)
+ * @param dist Pointer to a value which will contain the measured
+ * distance between 'coord' and the closest center point. The passed
+ * pointer can also be NULL in which case the distance will be
+ * lost.
+ *
+ * @return The closest center point.
+ */
virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL) = 0;
/**
- * Must be overwritten to get the (nearest) middle point to the
- * given coordinate for this entity.
- *
- * @param coord Coordinate (typically a mouse coordinate)
- * @param dist Pointer to a value which will contain the measured
- * distance between 'coord' and the closest middle point. The passed
- * pointer can also be NULL in which case the distance will be
- * lost.
- *
- * @return The closest middle point.
- */
+ * Must be overwritten to get the (nearest) middle point to the
+ * given coordinate for this entity.
+ *
+ * @param coord Coordinate (typically a mouse coordinate)
+ * @param dist Pointer to a value which will contain the measured
+ * distance between 'coord' and the closest middle point. The passed
+ * pointer can also be NULL in which case the distance will be
+ * lost.
+ *
+ * @return The closest middle point.
+ */
virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL) = 0;
/**
@@ -194,45 +194,45 @@ class RS_Entity: public RS_Undoable
virtual Vector getNearestSelectedRef(const Vector & coord, double * dist = NULL);
/**
- * Must be overwritten to get the shortest distance between this
- * entity and a coordinate.
- *
- * @param coord Coordinate (typically a mouse coordinate)
- * @param entity Pointer which will contain the (sub-)entity which is
- * closest to the given point or NULL if the caller is not
- * interested in this information.
- * @param level The resolve level.
- *
- * @sa RS2::ResolveLevel
- *
- * @return The measured distance between \p coord and the entity.
- */
+ * Must be overwritten to get the shortest distance between this
+ * entity and a coordinate.
+ *
+ * @param coord Coordinate (typically a mouse coordinate)
+ * @param entity Pointer which will contain the (sub-)entity which is
+ * closest to the given point or NULL if the caller is not
+ * interested in this information.
+ * @param level The resolve level.
+ *
+ * @sa RS2::ResolveLevel
+ *
+ * @return The measured distance between \p coord and the entity.
+ */
virtual double getDistanceToPoint(const Vector & coord, RS_Entity ** entity = NULL,
RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE) = 0;
virtual bool isPointOnEntity(const Vector & coord, double tolerance = RS_TOLERANCE);
/**
- * Implementations must move the entity by the given vector.
- */
+ * Implementations must move the entity by the given vector.
+ */
virtual void move(Vector offset) = 0;
/**
- * Implementations must rotate the entity by the given angle around
- * the given center.
- */
+ * Implementations must rotate the entity by the given angle around
+ * the given center.
+ */
virtual void rotate(Vector center, double angle) = 0;
/**
- * Implementations must scale the entity by the given factors.
- */
+ * Implementations must scale the entity by the given factors.
+ */
virtual void scale(Vector center, Vector factor) = 0;
virtual void scale(Vector center, double factor);
/**
- * Implementations must mirror the entity by the given axis.
- */
+ * Implementations must mirror the entity by the given axis.
+ */
virtual void mirror(Vector axisPoint1, Vector axisPoint2) = 0;
virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
@@ -240,12 +240,11 @@ class RS_Entity: public RS_Undoable
virtual void moveSelectedRef(const Vector & /*ref*/, const Vector & /*offset*/);
/**
- * Implementations must draw the entity on the given device.
- */
-// virtual void draw(RS_Painter* painter, RS_GraphicView* view,
- virtual void draw(PaintInterface * painter, RS_GraphicView * view, double patternOffset = 0.0) = 0;
+ * Implementations must draw the entity on the given device.
+ */
+ virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0) = 0;
- double getStyleFactor(RS_GraphicView * view);
+ double getStyleFactor(GraphicView * view);
QString * getUserDefVar(QString key);
QStringList getAllKeys();