graphiteview.h
来自「这是在wince下面可以跑的一个画函数的软件」· C头文件 代码 · 共 112 行
H
112 行
//
// Graphite For WinCE(Pocket PC)
// Initially Written By Hyouck "Hawk" Kim, peakhunt@yahoo.com
// 2002, All Rights Reserved
//
// This is GPLed, open source based, software development project.
// For more question about GPL,
// visit http://www.gnu.org/licenses/gpl.txt
//
//
// Revision History
// Nov/30/2002, Initial Release hkim
//
//
// graphiteView.h : interface of the CGraphiteView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_GRAPHITEVIEW_H__BE054D72_B563_4164_8B8E_FBA236AE47FB__INCLUDED_)
#define AFX_GRAPHITEVIEW_H__BE054D72_B563_4164_8B8E_FBA236AE47FB__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define NUM_MEASURE_PER_PAGE 10
#define TOP_SPACE_IN_PIXEL 30
#define SIDE_SPACE_IN_PIXEL 15
#define BOTTOM_SPACE_IN_PIXEL 15
class CGraphiteView : public CView
{
protected: // create from serialization only
CGraphiteView();
DECLARE_DYNCREATE(CGraphiteView)
// Attributes
public:
CGraphiteDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CGraphiteView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
void DrawGraph(CDC* pDC);
void DrawXYTitle(CDC* pDC);
void addPoint(double x, double y);
int physicalY(double vy);
int physicalX(double vx);
void GetPlotRect(CRect& edge, CRect& rect);
void DrawBackGround(CDC* dc);
virtual ~CGraphiteView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
private:
CString m_xTitle;
CString m_yTitle;
CBrush m_brush;
CDC m_backDC;
CBitmap m_backBitmap;
CDC m_xyTitleDC;
CBitmap m_xyTitleBitmap;
CDC m_graphDC;
CBitmap m_graphBitmap;
COLORREF m_crBack;
COLORREF m_crXY;
COLORREF m_crEdge;
COLORREF m_crDotLine;
COLORREF m_crTitle;
COLORREF m_crPlot;
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CGraphiteView)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in graphiteView.cpp
inline CGraphiteDoc* CGraphiteView::GetDocument()
{ return (CGraphiteDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_GRAPHITEVIEW_H__BE054D72_B563_4164_8B8E_FBA236AE47FB__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?