bool RArc::stretch(const RPolyline& area, const RVector& offset) { bool ret = false; if (area.contains(getStartPoint()) && area.contains(getEndPoint())) { return move(offset); } if (area.contains(getStartPoint())) { moveStartPoint(getStartPoint() + offset); ret = true; } else if (area.contains(getEndPoint())) { moveEndPoint(getEndPoint() + offset); ret = true; } return ret; }
bool RRay::stretch(const RPolyline& area, const RVector& offset) { bool ret = false; if (area.contains(basePoint)) { basePoint += offset; ret = true; } return ret; }
/** * Moves this vector by offset if it is inside the given area. */ RVector RVector::stretch(const RPolyline& area, const RVector& offset) { if (area.contains(*this)) { return move(offset); } return *this; }