Logo Search packages:      
Sourcecode: qcad version File versions  Download package

bool RS_Entity::isInWindow ( RS_Vector  v1,
RS_Vector  v2 
) [virtual, inherited]

True if the entity is in the given range.

Definition at line 235 of file rs_entity.cpp.

References RS_Entity::getMax(), RS_Entity::getMin(), RS_Vector::x, and RS_Vector::y.

Referenced by stretch(), RS_Line::stretch(), RS_EntityContainer::stretch(), RS_Entity::stretch(), RS_DimLinear::stretch(), and RS_DimAligned::stretch().

    double right, left, top, bottom;

    right = std::max(v1.x, v2.x);
    left = std::min(v1.x, v2.x);
    top = std::max(v1.y, v2.y);
    bottom = std::min(v1.y, v2.y);

    return (getMin().x>=left &&
            getMax().x<=right &&
            getMin().y>=bottom &&

Generated by  Doxygen 1.6.0   Back to index