1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0023712: Remove dependency on Aspect_GraphicDevice from Aspect_Window

This commit is contained in:
dbv
2013-02-18 11:59:36 +04:00
parent 8db070a59d
commit dc3fe572ec
114 changed files with 809 additions and 10216 deletions

View File

@@ -3309,37 +3309,6 @@ Standard_Boolean V3d_View::Dump (const Standard_CString theFile,
return ToPixMap (anImage, aWinWidth, aWinHeight, theBufferType) && anImage.Save (theFile);
}
////////////////////////////////////////////////////////////////
Standard_Boolean V3d_View::Dump (const Standard_CString theFile,
const Aspect_FormatOfSheetPaper theFormat,
const Graphic3d_BufferType& theBufferType)
{
// convert Aspect_FormatOfSheetPaper size to pixel ...
Quantity_Length anSPWidth, anSPHeight;
Aspect::ValuesOfFOSP (theFormat, anSPWidth, anSPHeight);
// adjusting to the ratio width/height ...
Quantity_Length aWinWidth, aWinHeight;
MyWindow->MMSize (aWinWidth, aWinHeight);
Standard_Integer aPixelWidth, aPixelHeight;
MyWindow->Size (aPixelWidth, aPixelHeight);
Quantity_Factor aScale = Min (anSPWidth / aWinWidth, anSPHeight / aWinHeight);
aPixelWidth = Standard_Integer (aPixelWidth * aScale);
aPixelHeight = Standard_Integer (aPixelHeight * aScale);
Image_AlienPixMap anImage;
ToPixMap (anImage, aPixelWidth, aPixelHeight, theBufferType);
OSD_Environment anEnvGamma ("CSF_GAMMA_CORRECTION");
TCollection_AsciiString strGamma (anEnvGamma.Value());
if (!anImage.IsEmpty() && !strGamma.IsEmpty())
{
Standard_Real aGammaValue = strGamma.RealValue();
anImage.AdjustGamma (aGammaValue);
}
return anImage.Save (theFile);
}
////////////////////////////////////////////////////////////////
Standard_Boolean V3d_View::ToPixMap (Image_PixMap& theImage,
const Standard_Integer theWidth,