⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shufadoc.cpp

📁 程序可以自动提取
💻 CPP
字号:
// shufaDoc.cpp : implementation of the CShufaDoc class
//

#include "stdafx.h"
#include "shufa.h"

#include "shufaDoc.h"
#include "BmpBaseMorph.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define WIDTHBYTES(i)    ((i+31)/32*4)

/////////////////////////////////////////////////////////////////////////////
// CShufaDoc

IMPLEMENT_DYNCREATE(CShufaDoc, CDocument)

BEGIN_MESSAGE_MAP(CShufaDoc, CDocument)
	//{{AFX_MSG_MAP(CShufaDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CShufaDoc construction/destruction

CShufaDoc::CShufaDoc()
{
	// TODO: add one-time construction code here

}

CShufaDoc::~CShufaDoc()
{
}

BOOL CShufaDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}

/////////////////////////////////////////////////////////////////////////////
// CShufaDoc serialization

void CShufaDoc::Serialize(CArchive& ar)
{
	
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	    ar.Flush(); 
		bimapok.ReadFile(ar.GetFile());
		bimapok.SetScreen();
        int Mask1[20][2]={{0,2},{0,-2},{1,2},{1,-2},{-1,-2},{-1,2},{2,1},{2,-1},{-2,-1},{-2,1},{-2,0},{2,0},{1,0},{0,-1},
		{-1,0},{0,1},{1,1},{1,-1},{-1,0},{-1,-1}};
		int Mask2[36][2]={{0,2},{0,-2},{1,2},{1,-2},{-1,-2},{-1,2},{2,1},{2,-1},{-2,-1},{-2,1},{-2,0},{2,0},{1,0},{0,-1},
		{-1,0},{0,1},{1,1},{1,-1},{-1,0},{-1,-1},{3,0},{3,1},{2,2},{1,3},{0,3},{-1,3},{-2,2},{-3,1},{-3,0},{-3,-1},{-2,-2},
		{-1,-3},{0,-3},{1,-3},{2,-2},{3,-1}};
		int Mask3[8][2]={{1,0},{0,1},{-1,0},{0,-1},{1,1},{-1,1},{-1,-1},{1,-1}};
		CBmpBaseMorph morph=CBmpBaseMorph(&bimapok,Mask1,20);
		morph.ReverseColor();
		morph.StructGenerator(1,1);
		morph.FindHightCurvaPoint();
		

		
		

    
		

	  
				
		
	}

}

/////////////////////////////////////////////////////////////////////////////
// CShufaDoc diagnostics

#ifdef _DEBUG
void CShufaDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CShufaDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////

void CShufaDoc::Display(CDC *pDC)
{
 bimapok.Display(pDC);


}
/////////////////////////////////
//图像处理


  

  
  




BOOL CShufaDoc::ThresholdBmp(LPSTR lpDIBBits, LONG lWidth, LONG lHeight)
{
 return TRUE;
}












⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -