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

📄 fractalexdoc.cpp

📁 自己写的一个分形程序
💻 CPP
字号:
// FractalExDoc.cpp : implementation of the CFractalExDoc class
//

#include "stdafx.h"
#include "FractalEx.h"

#include "FractalExDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFractalExDoc

IMPLEMENT_DYNCREATE(CFractalExDoc, CDocument)

BEGIN_MESSAGE_MAP(CFractalExDoc, CDocument)
	//{{AFX_MSG_MAP(CFractalExDoc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CFractalExDoc construction/destruction

CFractalExDoc::CFractalExDoc():JuliaSeed(0, 0), Perturbation(0, 0)
{
	fType=FRACTAL_NONE;
	colorset=0;
	ResetRect();
	expression="";
	origin="";
	iteration=170;
	fractalmode=FRACTAL_MODE_MAND;
}

CFractalExDoc::~CFractalExDoc()
{
}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CFractalExDoc serialization

void CFractalExDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		ar<<colorset<<fType<<myRect.left<<myRect.top<<myRect.right<<myRect.bottom<<expression<<origin;
	}
	else
	{
		ar>>colorset>>fType>>myRect.left>>myRect.top>>myRect.right>>myRect.bottom>>expression>>origin;
	}
}

/////////////////////////////////////////////////////////////////////////////
// CFractalExDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CFractalExDoc commands

void CFractalExDoc::SetData(CFractalExDoc* doc)
{
	myRect=doc->myRect;
	fType=doc->fType;
	colorset=doc->colorset;
}

void CFractalExDoc::ResetRect()
{
	myRect=CRectFloat(-3,-2,3,2);
}

⌨️ 快捷键说明

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