mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0024714: Camera integration - difference in behavior of V3d_View::SetSize
Restored behavior of SetSize method
This commit is contained in:
@@ -852,14 +852,12 @@ is
|
||||
raises BadValue from V3d;
|
||||
-- If one of the dimensions of the projection is NULL.
|
||||
|
||||
SetSize ( me : mutable ; Size : Length )
|
||||
SetSize ( me : mutable; theSize : Length )
|
||||
---Level: Public
|
||||
---Purpose: Defines the size of the view while preserving the
|
||||
-- center and height/width ratio of the window supporting
|
||||
-- the view.
|
||||
-- NOTE than the Depth of the View is NOT modified .
|
||||
raises BadValue from V3d ;
|
||||
-- If the size of the view is <= 0
|
||||
---Purpose: Defines the view projection size in its maximum dimension,
|
||||
-- keeping the inital height/width ratio unchanged.
|
||||
raises BadValue from V3d;
|
||||
-- If <theSize> is <= 0.0
|
||||
|
||||
SetZSize ( me : mutable ; Size : Length )
|
||||
---Level: Public
|
||||
|
@@ -1345,12 +1345,11 @@ void V3d_View::SetCenter (const Standard_Integer theXp,
|
||||
//function : SetSize
|
||||
//purpose :
|
||||
//=============================================================================
|
||||
void V3d_View::SetSize(const Standard_Real Size)
|
||||
void V3d_View::SetSize (const Standard_Real theSize)
|
||||
{
|
||||
V3d_BadValue_Raise_if( Size <= 0.,
|
||||
"V3d_View::SetSize, Window Size is NULL");
|
||||
V3d_BadValue_Raise_if (theSize <= 0.0, "V3d_View::SetSize, Window Size is NULL");
|
||||
|
||||
myCamera->SetScale (Size);
|
||||
myCamera->SetScale (myCamera->Aspect() >= 1.0 ? theSize / myCamera->Aspect() : theSize);
|
||||
|
||||
AutoZFit();
|
||||
|
||||
|
Reference in New Issue
Block a user