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

📄 graphicitem.h

📁 C语言库函数(包括所有的C语言库函数)
💻 H
字号:
#if !defined(AFX_LINE_H__2FD855E3_226D_4690_BE0B_EA9C8DECD67C__INCLUDED_)
#define AFX_LINE_H__2FD855E3_226D_4690_BE0B_EA9C8DECD67C__INCLUDED_

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

#include "AbstractVisitor.h"

//=================================================================
//图形元素基类;
//=================================================================
class CGraphicItem  : public CObject
{
public:
	CGraphicItem();
	virtual ~CGraphicItem();

public:
	//接受访问者访问接口;
	virtual void Accept    ( AbstractVisitor& v , CDC*)=0;

	//检测点p是否在图形元素所在区域内部;
	virtual bool Intersects( CPoint p                 )=0;
	
	//设置图形元素的偏移量;
	virtual void SetOffset ( int offsetX , int offsetY)=0;
	
	//取得图形元素的类型;
	virtual CString  GetOwnType()=0;

public:
	//取得中心点位置接口(圆);
	virtual CPoint GetCentrePoint(){ CPoint point(0,0); return point; }

	//取得半径接口(圆)
	virtual int    GetRadix(){return 0; }

	//取得矩形区域接口( 矩形 );
	virtual CRect  GetRect (){ CRect rect(0,0,0,0); return rect; }

	//取得起点位置接口(直线);
	virtual CPoint GetStartPoint(){ CPoint point(0 , 0 );return point;}
	
	//取得终点位置接口(直线);
	virtual CPoint GetEndPoint(){ CPoint point(0,0) ; return point ;}

public:
	//取得颜色;
	COLORREF GetColor()          { return m_color; }

	//设置颜色;
	void     SetColor(COLORREF c){ m_color = c   ; }

public:
	//图形元素颜色;
	COLORREF m_color;

};

#endif // !defined(AFX_LINE_H__2FD855E3_226D_4690_BE0B_EA9C8DECD35C__INCLUDED_)

⌨️ 快捷键说明

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