Esempio n. 1
0
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;
}
Esempio n. 2
0
bool RRay::stretch(const RPolyline& area, const RVector& offset) {
    bool ret = false;

    if (area.contains(basePoint)) {
        basePoint += offset;
        ret = true;
    }

    return ret;
}
Esempio n. 3
0
/**
 * 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;
}