/** * @return Dimension fixed length for extension lines true= fixed, false= not fixed. */ bool RS_Dimension::getFixedLengthOn() { int v = getGraphicVariableInt("$DIMFXLON", 2); if (v>1) { addGraphicVariable("$DIMFXLON", 0, 70); getGraphicVariableInt("$DIMFXLON", 0); return true; } return false; }
/** * @return Dimension labels alignement text true= horizontal, false= aligned. */ bool RS_Dimension::getAlignText() { int v = getGraphicVariableInt("$DIMTIH", 2); if (v>1) { addGraphicVariable("$DIMTIH", 0, 70); getGraphicVariableInt("$DIMTIH", 0); return true; } return false; }
/** * @return Dimension labels alignement text true= horizontal, false= aligned. */ bool RS_Dimension::getAlignText() { bool ret; int v = getGraphicVariableInt("$DIMTIH", 2); if (v>1) { addGraphicVariable("$DIMTIH", 0, 70); getGraphicVariableInt("$DIMTIH", 0); } v==0 ? ret = false :ret = true; return ret; }
/** * @return the given graphic variable or the default value given in mm * converted to the graphic unit. * If the variable is not found it is added with the given default * value converted to the local unit. */ double RS_Dimension::getGraphicVariable(const QString& key, double defMM, int code) { double v = getGraphicVariableDouble(key, RS_MINDOUBLE); if (v<=RS_MINDOUBLE) { addGraphicVariable( key, RS_Units::convert(defMM, RS2::Millimeter, getGraphicUnit()), code); v = getGraphicVariableDouble(key, 1.0); } return v; }