Пример #1
0
void REntityData::to2D() {
    RShape* shape = castToShape();
    if (shape==NULL) {
        return;
    }
    shape->to2D();
}
Пример #2
0
/**
 * Stretches the end points of this entity that are inside area by offset.
 */
bool REntityData::stretch(const RPolyline& area, const RVector& offset) {
    // if this entity is based on a shape (point,line,arc,...),
    // transform using shape API:
    RShape* s = castToShape();
    if (s==NULL) {
        return false;
    }
    return s->stretch(area, offset);
}
Пример #3
0
bool REntityData::flipVertical() {
    // if this entity is based on a shape (point,line,arc,...),
    // transform using shape API:
    RShape* s = castToShape();
    if (s==NULL) {
        return mirror(RLine(RVector(0,0), RVector(1,0)));
    }
    return s->flipVertical();
}
Пример #4
0
bool REntityData::mirror(const RLine& axis) {
    // if this entity is based on a shape (point,line,arc,...),
    // transform using shape API:
    RShape* s = castToShape();
    if (s==NULL) {
        return false;
    }
    return s->mirror(axis);
}
Пример #5
0
bool REntityData::scale(const RVector& scaleFactors, const RVector& center) {
    // if this entity is based on a shape (point,line,arc,...),
    // transform using shape API:
    RShape* s = castToShape();
    if (s==NULL) {
        return false;
    }
    return s->scale(scaleFactors, center);
}
Пример #6
0
bool REntityData::rotate(double rotation, const RVector& center) {
    // if this entity is based on a shape (point,line,arc,...),
    // transform using shape API:
    RShape* s = castToShape();
    if (s==NULL) {
        return false;
    }
    return s->rotate(rotation, center);
}