mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0021985: Vista/WIndows 7 compatibility issues reported by the community
WNT_Window::Dump method calls were replaced with V3dView::Dump calls Type casts were removed Added supported image formats in file filters of Export methods, edited documentation for Image_AlienPixMap class Supported image formats filter for 2dsample was extended
This commit is contained in:
@@ -241,20 +241,16 @@ CAnimationDoc* CAnimationView3D::GetDocument() // non-debug version is inline
|
||||
void CAnimationView3D::OnFileExportImage()
|
||||
{
|
||||
CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
_T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif | XWD Files (*.XWD)|*.xwd||"),
|
||||
_T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif | PNG Files (*.PNG)|*.png"
|
||||
"|JPEG Files (*.JPEG)|*.jpeg | PPM Files (*.PPM)|*.ppm | TIFF Files (*.TIFF)"
|
||||
"|*.tiff | TGA Files (*.TGA)|*.tga | EXR Files (*.EXR)|*.exr||"),
|
||||
NULL );
|
||||
|
||||
if (dlg.DoModal() == IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
CString filename = dlg.GetPathName();
|
||||
Handle(Aspect_Window) anAspectWindow = myView->Window();
|
||||
Handle(WNT_Window) aWNTWindow = Handle(WNT_Window)::DownCast(anAspectWindow);
|
||||
CString ext = dlg.GetFileExt();
|
||||
if (ext == "bmp") aWNTWindow->SetOutputFormat ( WNT_TOI_BMP );
|
||||
if (ext == "gif") aWNTWindow->SetOutputFormat ( WNT_TOI_GIF );
|
||||
if (ext == "xwd") aWNTWindow->SetOutputFormat ( WNT_TOI_XWD );
|
||||
aWNTWindow->Dump ((Standard_CString)(LPCTSTR)filename);
|
||||
CString aFileName = dlg.GetPathName();
|
||||
myView->Dump(aFileName);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user