#include "rs_debug.h"
#include "rs_document.h"
#include "rs_ellipse.h"
-#include "rs_graphic.h"
-#include "rs_graphicview.h"
+#include "drawing.h"
+#include "graphicview.h"
#include "rs_insert.h"
#include "rs_layer.h"
#include "rs_line.h"
* 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
*/
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);
*/
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);
*/
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);
*/
double RS_Entity::getGraphicVariableDouble(const QString & key, double def)
{
- RS_Graphic * graphic = getGraphic();
+ Drawing * graphic = getGraphic();
double ret = def;
if (graphic != NULL)
*/
int RS_Entity::getGraphicVariableInt(const QString & key, int def)
{
- RS_Graphic * graphic = getGraphic();
+ Drawing * graphic = getGraphic();
int ret = def;
if (graphic != NULL)
*/
QString RS_Entity::getGraphicVariableString(const QString & key, const QString & def)
{
- RS_Graphic * graphic = getGraphic();
+ Drawing * graphic = getGraphic();
QString ret = def;
if (graphic != NULL)
*/
RS2::Unit RS_Entity::getGraphicUnit()
{
- RS_Graphic * graphic = getGraphic();
+ Drawing * graphic = getGraphic();
RS2::Unit ret = RS2::None;
if (graphic != NULL)
* Implementations must drag the reference point(s) of all
* (sub-)entities that are very close to ref by offset.
*/
-/*virtual*/ void RS_Entity::moveRef(const Vector & /*ref*/, const Vector & /*offset*/)
+/*virtual*/ void RS_Entity::moveRef(const Vector &/*ref*/, const Vector &/*offset*/)
{
return;
}
* Implementations must drag the reference point(s) of selected
* (sub-)entities that are very close to ref by offset.
*/
-/*virtual*/ void RS_Entity::moveSelectedRef(const Vector & /*ref*/, const Vector & /*offset*/)
+/*virtual*/ void RS_Entity::moveSelectedRef(const Vector &/*ref*/, const Vector &/*offset*/)
{
return;
}
*/
void RS_Entity::setLayer(const QString & name)
{
- RS_Graphic * graphic = getGraphic();
+ Drawing * graphic = getGraphic();
if (graphic != NULL)
layer = graphic->findLayer(name);
*/
void RS_Entity::setLayerToActive()
{
- RS_Graphic * graphic = getGraphic();
+ Drawing * graphic = getGraphic();
if (graphic != NULL)
layer = graphic->getActiveLayer();
* @return Factor for scaling the line styles considering the current
* paper scaling and the fact that styles are stored in Millimeter.
*/
-double RS_Entity::getStyleFactor(RS_GraphicView * view)
+double RS_Entity::getStyleFactor(GraphicView * view)
{
double styleFactor = 1.0;
//styleFactor = getStyleFactor();
// the factor caused by the unit:
RS2::Unit unit = RS2::None;
- RS_Graphic * g = getGraphic();
+ Drawing * g = getGraphic();
if (g != NULL)
{
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();
return os;
}
-