line.h

来自「股票控件源代码」· C头文件 代码 · 共 49 行

H
49
字号
// Line.h: interface for the CLine class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LINE_H__066CA26E_8D39_4E1F_B613_616B1C19D4D3__INCLUDED_)
#define AFX_LINE_H__066CA26E_8D39_4E1F_B613_616B1C19D4D3__INCLUDED_

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

#include "Element.h"
#include "Base\as_position.hxx"
#include "Dot.h"

class CLine : public CElement  
{
public:
	CLine();
	virtual ~CLine();
private:
	CDot *m_pStart,*m_pEnd;

	
public:
	//在画橡皮条时动态改变起点与终点
	CDot *Start(){return m_pStart;};
	void Start(CDot *pt){m_pStart=pt;};
	CDot *End(){return m_pEnd;};
	void End(CDot *pt){m_pEnd=pt;};

public:
	virtual void GetRect(CDot &lefttop,CDot &rightbottom);
	//绘制图元
	virtual void      Draw(CDC *pDC,CScn *pScn);
	virtual void      Draw(CDC *pDC,CScn *pScn,transf tran);
	//移动修改图元
	virtual void      MoveModify(transf tran);
    //高亮
	virtual void      HightLight(CDC *pDC,BOOL bHightLight,CScn *pScn,long nColor);
	//选中
	virtual void      ShowSelect(CDC *pDC,BOOL bSelect,CScn *pScn,long nColor);
	virtual BOOL Pick(position&	pe,position& ret_pos,double& dist,double pick_tol,int &type,int &ext_type);
friend void GetLineTanDir(CLine *pLine, const position pos_on_element,const position	pos_on_arc,
position&	pos_start,position&	pos_end);
};

#endif // !defined(AFX_LINE_H__066CA26E_8D39_4E1F_B613_616B1C19D4D3__INCLUDED_)

⌨️ 快捷键说明

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