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

📄 line.h

📁 一个折线不重复相交的程序, 一家日本公司的程序员上机题
💻 H
字号:
#pragma once

#include <math.h>

#include <list>
using namespace std;

struct Line
{
    POINT pos_1;
	POINT pos_2;
};

class CLine
{
private:
	list< POINT > m_PosList;
	list< POINT > m_PosPart_Left;
	list< POINT > m_PosPart_Right;

	int           m_posWidth;

	POINT         m_nowpos;
	POINT         m_mousepos;
	Line          m_mouseline;

	//文字
	TCHAR         m_TxT[512];

public:
	CLine(void);
	~CLine(void);

	void InsertPos( );
	void InsertPos( POINT pos );
	void InsertPos( int x, int y );

	void SetNowPos( POINT pos );
	void SetNowPos( int x, int y );

	void SetMousePos( POINT pos );
	void SetMousePos( int x, int y );

	void DrawLine( HDC hdc );

	void GetStartPos( POINT& pos );
	void GetEndPos( POINT& pos );

private:
	BOOL CheckLine( Line line1, Line line2 ); //如果相交, 则返回TRUE
};

extern CLine* g_line;

⌨️ 快捷键说明

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