Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TShowExtend.cpp
T
2026-09-28 15:28:50 +08:00

45 lines
1.0 KiB
C++

//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
// = FileName : TShowExtend.cpp
// = Version : ver2.0
// = Author : xlc
// = CreateDate : 2002-09-09
// = Description: ÀàµÄ¶¨Òå
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#include "StdAfx.h"
#include "TShowExtend.h"
#include "TPushAcadVar.h"
#include "TchGlobalFunc.h"
TShowExtend::TShowExtend(TPickEntSet &ss)
: restoreScr(0)
{
TADSGePoint3d ptLow, ptUp;
ss.GetExtend(ptLow, ptUp);
GetScreenCorner(lowCorner, upCorner);
ptLow.z = ptUp.z = lowCorner.z;
if (Max(upCorner, ptUp) != upCorner || Min(lowCorner, ptLow) != lowCorner)
{
ptUp.x += 10;
ptUp.y += 10;
ptLow.x -= 10;
ptLow.y -= 10;
TPushAcadVar<int> osmode(_T("OSMODE"), 0);
ArxZoom(ptLow, ptUp);
restoreScr = 1;
}
}
TShowExtend::~TShowExtend()
{
if (restoreScr)
{
TPushAcadVar<int> osmode(_T("OSMODE"), 0);
ArxZoom(lowCorner, upCorner);
}
}