pline.h

来自「一个很不错的求Voronoi线与最小凸壳的vc++源程序」· C头文件 代码 · 共 54 行

H
54
字号
// Pline.h: interface for the CPline class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PLINE_H__C38EA2BA_20D4_4353_A24A_3147BE233335__INCLUDED_)
#define AFX_PLINE_H__C38EA2BA_20D4_4353_A24A_3147BE233335__INCLUDED_

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

#include "Draw.h"

typedef struct
{
	double x;
    double y;
}PointStruct;//点
typedef struct
{
	double x1;
	double y1;
	double x2;
	double y2;
	PointStruct* Point1;
	PointStruct* Point2;
	BOOL exist;
}LineStruct;//Voronoi图的各边
class CPline : public CDraw  
{
protected:
	int m_Number;
	PointStruct* m_PointList;
public:
	CPline();
	CPline(short ColorPen,short ColorBrush,float LineWide,short LineType,
		   short Layer,int id_only,BOOL Delete,int Number,PointStruct* PointList)
		   :CDraw(ColorPen,ColorBrush,LineWide,LineType,Layer,id_only,Delete)
	{
		m_Number=Number;
		m_PointList=new PointStruct[Number+1];
		if(Number>0)
		{
			for(int i=0;i<Number;i++)
				m_PointList[i]=PointList[i];
		}
	}
 	virtual void Draw(CDC *pDC,int m_DrawMode,int m_DrawModel,short BackColor,int id);
	virtual ~CPline();

};

#endif // !defined(AFX_PLINE_H__C38EA2BA_20D4_4353_A24A_3147BE233335__INCLUDED_)

⌨️ 快捷键说明

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