mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023931: Incorrect image export code in MFC sample: Added OCC_BaseDoc::ExportView() method to unify image export procedure in all MFC samples.
Compilation errors were corrected.
This commit is contained in:
@@ -9,11 +9,12 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include "OCC_BaseDoc.h"
|
||||
#include "ResultDialog.h"
|
||||
|
||||
class Handle_AIS_Point;
|
||||
|
||||
class CGeometryDoc : public CDocument
|
||||
class CGeometryDoc : public OCC_BaseDoc
|
||||
{
|
||||
public:
|
||||
void Put2DOnTop(bool isMax = true);
|
||||
@@ -210,26 +211,16 @@ protected:
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
|
||||
private:
|
||||
Handle_V3d_Viewer myViewer;
|
||||
Handle_V3d_Viewer myViewerCollector;
|
||||
Handle_AIS_InteractiveContext myAISContext;
|
||||
public :
|
||||
Handle_AIS_InteractiveContext& GetAISContext(){ return myAISContext; };
|
||||
Handle_V3d_Viewer GetViewer() { return myViewer; };
|
||||
Handle_V3d_Viewer GetViewerCollector() { return myViewerCollector; };
|
||||
|
||||
|
||||
private:
|
||||
Handle_V3d_Viewer myViewer2D;
|
||||
Handle_AIS_InteractiveContext myAISContext2D;
|
||||
public :
|
||||
|
||||
public:
|
||||
int Current;
|
||||
void Minimize3D();
|
||||
void Minimize2D();
|
||||
Handle_V3d_Viewer GetViewer2D() { return myViewer2D; };
|
||||
Handle_AIS_InteractiveContext& GetISessionContext(){ return myAISContext2D; };
|
||||
Handle_V3d_Viewer GetViewer2D() { return myViewer2D; };
|
||||
Handle_AIS_InteractiveContext& GetISessionContext() { return myAISContext2D; };
|
||||
BOOL FitMode;
|
||||
|
||||
public :
|
||||
|
@@ -79,23 +79,7 @@ CGeometryDoc* CGeometryView::GetDocument() // non-debug version is inline
|
||||
|
||||
void CGeometryView::OnFileExportImage()
|
||||
{
|
||||
CFileDialog aDlg (FALSE, "*.BMP", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPG)|*.jpg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||", NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
myView->Dump (aDlg.GetPathName());
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
GetDocument()->ExportView (myView);
|
||||
}
|
||||
|
||||
void CGeometryView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
|
||||
|
Reference in New Issue
Block a user