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

📄 xspot.h

📁 一款改进了的查询系统----北京公交车查询系统
💻 H
字号:
#pragma once

#include <Gdiplus.h>
using namespace Gdiplus;

#include <map>
using namespace std;

class XTube;
enum SpotTypeEnum
{
	STE_NULL,
	STE_LEFT,
	STE_RIGHT,
	STE_CIRCLE,
	STE_SMALL_CIRCLE,
	STE_MEDIUM_CIRCLE,
	STE_LARGE_CIRCLE,	//大圆
	STE_START,
	STE_END,
	STE_INNER, //
	STE_OUTER, //
	STE_AUTO,
};

enum IconTypeEnum
{
	ITE_NULL, 
};

class XSpot
{
	friend class XTube;

private:
	XTube* parent;

protected:
	PointF position; //位置

	SpotTypeEnum type;

	CString name;
	CString title;
	CString description;

	IconTypeEnum icon;

	Color color;

	Color fontColor;
	CString fontFace;
	REAL fontHeight;
	int fontStyle;

protected:
	//<<
	PointF left;
	PointF right;
	PointF center;

	REAL angle;
	REAL startAngle;
	REAL sweepAngle;
	REAL radius;
	//>>

	//<<
	REAL ANGLE;
	PointF A;
	PointF B1, B2; //方块的位置
	PointF C1, C2; //label的位置
	//>>

public:
	XSpot (PointF pt = PointF (0.0, 0.0), SpotTypeEnum vType = STE_LEFT, CString vName = "");
	XSpot (Point pt, SpotTypeEnum vType = STE_LEFT, CString vName = "");

	bool operator == (const XSpot& vSpot);

	void SetParent (XTube* vParent);
	XTube* GetParent () {return parent;}

	void SetType (SpotTypeEnum vType);
	SpotTypeEnum GetType () {return type;}

	void SetName (CString vName) {name = vName;};
	CString GetName () {return name;}

	void SetTitle (CString vTitle) {title = vTitle;};
	CString GetTitle () {return title;}

	void SetDescription (CString vDescription) {description = vDescription;}
	CString GetDescription () {return description;}

	void SetPosition (PointF vPosition) {position = vPosition;}
	PointF GetPosition () {return position;}

	void SetColor (Color vColor) {color = vColor;}
	Color GetColor () {return color;}

	void SetFontColor (Color vFontColor) {fontColor = vFontColor;}
	Color GetFontColor () {return fontColor;}

	void SetFontFace (CString vFontFace) {fontFace = vFontFace;}
	CString GetFontFace () {return fontFace;}

	void SetFontHeight (REAL vFontHeight) {fontHeight = vFontHeight;}
	REAL GetFontHeight () {return fontHeight;}

	void SetFontStyle (int vFontStyle) {fontStyle = vFontStyle;}
	int GetFontStyle () {return fontStyle;}

public:
	int Move (float x, float y);
	int Draw (Graphics* g, map<CString, PointF>* spotMap = NULL);
};

⌨️ 快捷键说明

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