www.pudn.com > MapCut.rar > MapCutView.h
// MapCutView.h : interface of the CMapCutView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAPCUTVIEW_H__DBA9685F_E25E_4E2C_B936_F6097B9C2A71__INCLUDED_)
#define AFX_MAPCUTVIEW_H__DBA9685F_E25E_4E2C_B936_F6097B9C2A71__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMapCutView : public CView
{
protected: // create from serialization only
CMapCutView();
DECLARE_DYNCREATE(CMapCutView)
// Attributes
public:
CMapCutDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMapCutView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
int hori1,hori2,vert1,vert2;
long hori[1000],vert[1000];//制作投影直方图
float get_s(int x,int y); //计算象素的饱和度
int numcolor;
COLORREF GetPixel(int x, int y); //得到(X,Y)的象素值
void SetPixel(int x,int y,COLORREF color,BYTE *pd); //将颜色写入(X,Y)位置
BYTE* pdibtmp; //给位图分配的存储空间的指针
void ShowPhoto(int x, int y, int cx, int cy, CDC *dc); //在屏幕上显示图像
int flag;
BYTE *pdibtmp1,*pdibtmp2,*pdibtmp3,*pdibtmp4,*pdibtmp5,*pdibtmp6,*pdibtmp7,*pdibtmp8,*pdibtmp9;
BYTE* pdib; //图像信息
LPBITMAPINFO m_pBmpInfo; //位图信息
LPBITMAPINFOHEADER m_pBmpInfoHeader; //位图信息头
LPBITMAPFILEHEADER m_pBmpFileHeader; //文件信息头
virtual ~CMapCutView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMapCutView)
afx_msg void OnMenuitem32771();
afx_msg void OnMenuitem32772();
afx_msg void OnFileOpen();
afx_msg void OnMenuitem32776();
afx_msg void OnMenuitem32777();
afx_msg void OnMenuitem32775();
afx_msg void OnMenuitem32778();
afx_msg void OnMenuitem32781();
afx_msg void OnMenuitem32782();
afx_msg void OnMenuitem32783();
afx_msg void OnMenuitem32784();
afx_msg void OnMenuitem32785();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in MapCutView.cpp
inline CMapCutDoc* CMapCutView::GetDocument()
{ return (CMapCutDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAPCUTVIEW_H__DBA9685F_E25E_4E2C_B936_F6097B9C2A71__INCLUDED_)