X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Frs_entity.cpp;h=fc7dbeab804b20affd93e124d7c014da0d40151e;hb=46a5b82a20219b6d24e6095f56843db3eaa45595;hp=d633d222c67de02c8e0370f0477c15e144b4ae61;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/base/rs_entity.cpp b/src/base/rs_entity.cpp index d633d22..fc7dbea 100644 --- a/src/base/rs_entity.cpp +++ b/src/base/rs_entity.cpp @@ -20,7 +20,7 @@ #include "rs_debug.h" #include "rs_document.h" #include "rs_ellipse.h" -#include "rs_graphic.h" +#include "drawing.h" #include "rs_graphicview.h" #include "rs_insert.h" #include "rs_layer.h" @@ -426,10 +426,10 @@ void RS_Entity::setParent(RS_EntityContainer * p) * or the parent's parent graphic or NULL if none of the parents * are stored in a graphic. */ -RS_Graphic * RS_Entity::getGraphic() +Drawing * RS_Entity::getGraphic() { if (rtti() == RS2::EntityGraphic) - return (RS_Graphic *)this; + return (Drawing *)this; else if (parent == NULL) return NULL; else @@ -552,7 +552,7 @@ Vector RS_Entity::getSize() const */ void RS_Entity::addGraphicVariable(const QString & key, double val, int code) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); if (graphic != NULL) graphic->addVariable(key, val, code); @@ -566,7 +566,7 @@ void RS_Entity::addGraphicVariable(const QString & key, double val, int code) */ void RS_Entity::addGraphicVariable(const QString & key, int val, int code) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); if (graphic != NULL) graphic->addVariable(key, val, code); @@ -580,7 +580,7 @@ void RS_Entity::addGraphicVariable(const QString & key, int val, int code) */ void RS_Entity::addGraphicVariable(const QString & key, const QString & val, int code) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); if (graphic != NULL) graphic->addVariable(key, val, code); @@ -597,7 +597,7 @@ void RS_Entity::addGraphicVariable(const QString & key, const QString & val, int */ double RS_Entity::getGraphicVariableDouble(const QString & key, double def) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); double ret = def; if (graphic != NULL) @@ -617,7 +617,7 @@ double RS_Entity::getGraphicVariableDouble(const QString & key, double def) */ int RS_Entity::getGraphicVariableInt(const QString & key, int def) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); int ret = def; if (graphic != NULL) @@ -637,7 +637,7 @@ int RS_Entity::getGraphicVariableInt(const QString & key, int def) */ QString RS_Entity::getGraphicVariableString(const QString & key, const QString & def) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); QString ret = def; if (graphic != NULL) @@ -652,7 +652,7 @@ QString RS_Entity::getGraphicVariableString(const QString & key, const QString & */ RS2::Unit RS_Entity::getGraphicUnit() { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); RS2::Unit ret = RS2::None; if (graphic != NULL) @@ -786,7 +786,7 @@ RS_Layer * RS_Entity::getLayer(bool resolve) const */ void RS_Entity::setLayer(const QString & name) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); if (graphic != NULL) layer = graphic->findLayer(name); @@ -809,7 +809,7 @@ void RS_Entity::setLayer(RS_Layer * l) */ void RS_Entity::setLayerToActive() { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); if (graphic != NULL) layer = graphic->getActiveLayer(); @@ -930,7 +930,7 @@ double RS_Entity::getStyleFactor(RS_GraphicView * view) //styleFactor = getStyleFactor(); // the factor caused by the unit: RS2::Unit unit = RS2::None; - RS_Graphic * g = getGraphic(); + Drawing * g = getGraphic(); if (g != NULL) { @@ -949,7 +949,7 @@ double RS_Entity::getStyleFactor(RS_GraphicView * view) if (view->isPrinting() || view->isPrintPreview() || view->isDraftMode() == false) { - RS_Graphic * graphic = getGraphic(); + Drawing * graphic = getGraphic(); if (graphic != NULL && graphic->getPaperScale() > 1.0e-6) styleFactor /= graphic->getPaperScale();