/** * Initializes the text data of the text label of this dimension. * The text data is created at 0/0 at an angle or 0. Moving the * label to the right position at the right angle is up to the * particular dimension implementation. */ void RDimensionData::initTextData() const { double dimtxt = getDimtxt(); QString label = getMeasurement(); // TODO: fontName property takes precedence textData = RTextData(RVector(0,0), // position RVector(0,0), // alignment point dimtxt, // text height 0.0, RS::VAlignMiddle, RS::HAlignCenter, RS::LeftToRight, RS::Exact, 1.0, label, //fontName, (document==NULL || document->getDimensionFont().isEmpty()) ? "Standard" : document->getDimensionFont(), false, false, 0.0, false // not simple (diameter signs, stacked text, ...) ); textData.setDocument(document); textData.setLayerId(getLayerId()); textData.setBlockId(getBlockId()); textData.setColor(getColor()); textData.setLineweight(getLineweight()); textData.setSelected(isSelected()); textData.setDimensionLabel(true); //qDebug() << "label color: " << textData.getColor(); //qDebug() << "textData: " << textData; dirty = true; }
/** * Initializes the text data of the text label of this dimension. * The text data is created at 0/0 at an angle or 0. Moving the * label to the right position at the right angle is up to the * particular dimension implementation. */ void RDimensionData::initTextData() const { double dimtxt = getDimtxt(); QString label = getMeasurement(); textData = RTextData(RVector(0,0), // position RVector(0,0), // alignment point dimtxt, // text height 0.0, RS::VAlignMiddle, RS::HAlignCenter, RS::LeftToRight, RS::Exact, 1.0, label, //fontName, "Standard", false, false, 0.0, false // not simple (diameter signs, stacked text, ...) ); dirty = true; }