/** * Height of the text (this is not equal to the bounding box height as it is * the height of the text at 0 angle). */ double RTextBasedData::getHeight() const { if (RMath::isNaN(height) || dirty) { getPainterPaths(gotDraft); } return height; }
/** * Width of the text (this is not equal to the bounding box width as it is * the width of the text at 0 angle). */ double RTextBasedData::getWidth() const { if (RMath::isNaN(width) || dirty) { getPainterPaths(gotDraft); } return width; }
RBox RTextData::getBoundingBox() const { if (!boundingBox.isValid() || dirty) { getPainterPaths(gotDraft); } return boundingBox; }
RBox RTextBasedData::getBoundingBox() const { if (!boundingBox.isValid() || dirty) { getPainterPaths(gotDraft); } //qDebug() << "bb: " << boundingBox; return boundingBox; }
void RGraphicsSceneQt::highlightEntity(REntity& entity) { beginPreview(); // get painter paths for closest entity: QList<RPainterPath> painterPaths = getPainterPaths(entity.getId()); for (int i = 0; i < painterPaths.size(); ++i) { painterPaths[i].setSelected(entity.isSelected()); painterPaths[i].setHighlighted(true); } addToPreview(painterPaths); endPreview(); }
RBox RTextBasedData::getBoundingBox(bool ignoreEmpty) const { if (!boundingBox.isValid() || dirty) { getPainterPaths(gotDraft); } // if (!ignoreEmpty && boundingBox.getWidth()<RS::PointTolerance && boundingBox.getHeight()<RS::PointTolerance) { // RDebug::printBacktrace(); // } if (ignoreEmpty && boundingBox.getWidth()<RS::PointTolerance && boundingBox.getHeight()<RS::PointTolerance) { return RBox(); } return boundingBox; }