예제 #1
0
RPolyline RPasteOperation::getBoundary(double unitFactor) {
    RBox box = sourceDocument.getBoundingBox();
    RPolyline polyline = box.getPolyline2d();
    polyline.scale(scale * unitFactor);
    polyline.rotate(rotation);
    polyline.move(offset);
    return polyline;
}
예제 #2
0
RPolyline RPasteOperation::getBoundary(double unitFactor) {
    RBox box = sourceDocument.getBoundingBox();
    RPolyline polyline = box.getPolyline2d();
    if (flipHorizontal) {
        polyline.flipHorizontal();
    }
    if (flipVertical) {
        polyline.flipVertical();
    }
    polyline.scale(scale * unitFactor);
    polyline.rotate(getRotation());
    polyline.move(getOffset());
    return polyline;
}
예제 #3
0
/**
 * \return A polygon that contains this entity.
 * Default implementation returns a polygon around the bounding box.
 */
RPolyline REntityData::getHull(double offset) const {
    RBox bb = getBoundingBox();
    bb.grow(offset);
    return bb.getPolyline2d();
}
예제 #4
0
bool RShape::stretch(const RBox& area, const RVector& offset) {
    return stretch(area.getPolyline2d(), offset);
}