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

📄 draw.h

📁 实现波形的显示,可以作为示波器的一个模块
💻 H
字号:
// Draw.h: interface for the CDraw class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_DRAW_H__C9364F4D_B39C_4872_9597_F2984FA9EA04__INCLUDED_)
#define AFX_DRAW_H__C9364F4D_B39C_4872_9597_F2984FA9EA04__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

struct pos_t { /* struct of position */
	int x;
	int y;
};

class CDraw  
{
public:

	CDraw(pos_t orign, pos_t xEnd , pos_t yEnd , unsigned int span, \
		  unsigned int maxHor, unsigned int maxVer);
	virtual ~CDraw();

	int dot(pos_t dot); /* draw the dot */
	int line(pos_t start, pos_t end); /* draw the line */
	int coordination(pos_t xEnd, pos_t yEnd); /* draw the coordination */
	
	void setSpan(unsigned int span); /* set the span */
	int getSpan(void); /* get the span */

	void setMaxHor(unsigned int maxHor); /* set the maxHor */
	int getMaxHor(void); /* get the maxHor */

	void setMaxVer(unsigned int maxVer); /* set the maxVer */
	int getMaxVer(void); /* get the maxVer */

	void multiScale(unsigned int multip);

private:

	int drawXcoordination(); /* draw X coordination */
	int drawYcoordination(); /* draw Y coordination */
	
	pos_t m_orign;
	pos_t m_xEnd;
	pos_t m_yEnd;
	unsigned int m_span;
	unsigned int m_maxHor;
	unsigned int m_maxVer;
};

#endif // !defined(AFX_DRAW_H__C9364F4D_B39C_4872_9597_F2984FA9EA04__INCLUDED_)

⌨️ 快捷键说明

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