QList<RRefPoint> RCircleData::getReferencePoints(RS::ProjectionRenderingHint hint) const { Q_UNUSED(hint) QList<RRefPoint> ret; ret.append(RRefPoint(center, RRefPoint::Center)); ret.append(RRefPoint(center + RVector(radius, 0), RRefPoint::Secondary)); ret.append(RRefPoint(center + RVector(0, radius), RRefPoint::Secondary)); ret.append(RRefPoint(center - RVector(radius, 0), RRefPoint::Secondary)); ret.append(RRefPoint(center - RVector(0, radius), RRefPoint::Secondary)); return ret; }
QList<RRefPoint> RPolylineData::getReferencePoints(RS::ProjectionRenderingHint hint) const { Q_UNUSED(hint) QList<RRefPoint> ret = RRefPoint::toRefPointList(getVertices()); if (!ret.isEmpty()) { // mark start and end points: ret.first().setStart(true); ret.last().setEnd(true); } for (int i=0; i<countSegments(); i++) { if (isArcSegmentAt(i)) { QSharedPointer<RArc> arc = getSegmentAt(i).dynamicCast<RArc>(); if (!arc.isNull()) { ret.append(RRefPoint(arc->getMiddlePoint(), RRefPoint::Secondary)); } } } return ret; }
QList<RRefPoint> REllipseData::getReferencePoints(RS::ProjectionRenderingHint hint) const { Q_UNUSED(hint) QList<RRefPoint> ret; ret.append(RRefPoint(center, RRefPoint::Center)); ret.append(RRefPoint(center+majorPoint, RRefPoint::Secondary)); ret.append(RRefPoint(center-majorPoint, RRefPoint::Secondary)); ret.append(RRefPoint(center+getMinorPoint(), RRefPoint::Secondary)); ret.append(RRefPoint(center-getMinorPoint(), RRefPoint::Secondary)); ret.append(RRefPoint::toRefPointList(getFoci(), RRefPoint::Secondary)); if (!isFullEllipse()) { ret.append(RRefPoint(getStartPoint(), RRefPoint::Start)); ret.append(RRefPoint(getEndPoint(), RRefPoint::End)); } return ret; }
QList<RRefPoint> RArcData::getReferencePoints(RS::ProjectionRenderingHint hint) const { Q_UNUSED(hint) QList<RRefPoint> ret; ret.append(RRefPoint(center, RRefPoint::Center)); ret.append(getStartPoint()); ret.append(getEndPoint()); ret.append(RRefPoint(getMiddlePoint(), RRefPoint::Secondary)); QList<RRefPoint> p; p.append(RRefPoint(center + RVector(radius, 0), RRefPoint::Secondary)); p.append(RRefPoint(center + RVector(0, radius), RRefPoint::Secondary)); p.append(RRefPoint(center - RVector(radius, 0), RRefPoint::Secondary)); p.append(RRefPoint(center - RVector(0, radius), RRefPoint::Secondary)); for (int i=0; i<p.size(); i++) { if (RMath::isAngleBetween(center.getAngleTo(p[i]), startAngle, endAngle, reversed)) { ret.append(p[i]); } } return ret; }