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(); }
QList<RVector> REntity::getIntersectionPoints( const REntity& other, bool limited, const RBox& queryBox, bool ignoreComplex) const { bool same = false; // avoid intersection finding for intersections of interpolated entities // (e.g. splines) with themselves: if (getId()!=INVALID_ID && getId()==other.getId() && getDocument()==other.getDocument()) { const RShape* shape = getData().castToConstShape(); if (shape!=NULL && shape->isInterpolated()) { same = true; } const RPolyline* pl = dynamic_cast<const RPolyline*>(shape); if (pl!=NULL) { same = true; } } return getData().getIntersectionPoints(other.getData(), limited, same, queryBox, ignoreComplex); }