|
//------------------------------------------------------------------------------
Acad::ErrorStatus ZoomTo(AcGePoint2d& Min, AcGePoint2d& Max, double dZoomFactor)
//------------------------------------------------------------------------------
{
Acad::ErrorStatus es = (Acad::ErrorStatus)-1;
// Check zoom makes sense
if ((Max.y - Min.y) > 0.001 || (Max.x - Min.x) > 0.001)
{
AcDbViewTableRecord mVTR;
mVTR.setCenterPoint(Min + (Max - Min) / 2.0);
mVTR.setHeight((Max.y - Min.y) * dZoomFactor);
mVTR.setWidth((Max.x - Min.x) * dZoomFactor);
es = acedSetCurrentView(&mVTR, NULL);
}
return es;
} |
|