资源简介
基于VC6.0的利用bresenham算法画直线的程序,里面有详细的Bresenham算法过程,有助于计算机图形学的学习
代码片段和文件信息
// DrawBresenham.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “DrawBresenham.h“
#include “MainFrm.h“
#include “DrawBresenhamDoc.h“
#include “DrawBresenhamView.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDrawBresenhamApp
BEGIN_MESSAGE_MAP(CDrawBresenhamApp CWinApp)
//{{AFX_MSG_MAP(CDrawBresenhamApp)
ON_COMMAND(ID_APP_ABOUT OnAppAbout)
// 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
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDrawBresenhamApp construction
CDrawBresenhamApp::CDrawBresenhamApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CDrawBresenhamApp object
CDrawBresenhamApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CDrawBresenhamApp initialization
BOOL CDrawBresenhamApp::InitInstance()
{
AfxEnableControlContainer();
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
// Change the registry key under which our settings are stored.
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization.
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
// Register the application‘s document templates. Document templates
// serve as the connection between documents frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CDrawBresenhamDoc)
RUNTIME_CLASS(CMainframe) // main SDI frame window
RUNTIME_CLASS(CDrawBresenhamView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell commands DDE file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initial
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-01-10 14:59 DrawBresenham\
文件 44836 2012-09-19 16:01 DrawBresenham\DrawBresenham.aps
文件 3073 2012-09-23 17:04 DrawBresenham\DrawBresenham.clw
文件 4335 2012-09-11 15:45 DrawBresenham\DrawBresenham.cpp
文件 4807 2012-09-11 17:48 DrawBresenham\DrawBresenham.dsp
文件 549 2012-09-11 15:45 DrawBresenham\DrawBresenham.dsw
文件 1433 2012-09-11 15:45 DrawBresenham\DrawBresenham.h
文件 66560 2012-09-23 17:04 DrawBresenham\DrawBresenham.ncb
文件 49664 2012-09-23 17:04 DrawBresenham\DrawBresenham.opt
文件 260 2012-09-20 19:59 DrawBresenham\DrawBresenham.plg
文件 12702 2012-09-19 16:01 DrawBresenham\DrawBresenham.rc
文件 1882 2012-09-11 15:45 DrawBresenham\DrawBresenhamDoc.cpp
文件 1552 2012-09-11 15:45 DrawBresenham\DrawBresenhamDoc.h
文件 5787 2012-09-20 19:58 DrawBresenham\DrawBresenhamView.cpp
文件 1979 2012-09-17 21:45 DrawBresenham\DrawBresenhamView.h
文件 2822 2012-09-17 21:40 DrawBresenham\DrawSetLine.cpp
文件 1373 2012-09-17 21:29 DrawBresenham\DrawSetLine.h
文件 2499 2012-09-17 21:47 DrawBresenham\MainFrm.cpp
文件 1469 2012-09-11 15:48 DrawBresenham\MainFrm.h
文件 4479 2012-09-11 15:45 DrawBresenham\ReadMe.txt
文件 215 2012-09-11 15:45 DrawBresenham\StdAfx.cpp
文件 1054 2012-09-11 15:45 DrawBresenham\StdAfx.h
目录 0 2012-09-11 15:45 DrawBresenham\res\
文件 1078 2012-09-11 15:45 DrawBresenham\res\DrawBresenham.ico
文件 405 2012-09-11 15:45 DrawBresenham\res\DrawBresenham.rc2
文件 1078 2012-09-11 15:45 DrawBresenham\res\DrawBresenhamDoc.ico
文件 1078 2012-09-11 15:45 DrawBresenham\res\Toolbar.bmp
文件 969 2012-09-19 16:01 DrawBresenham\resource.h
- 上一篇:信道容量的迭代算法的C语言实现
- 下一篇:aes加密算法的verilog和c++代码
评论
共有 条评论