?? maprectangle.h
字號:
/************************************************************
文件名: MapRectangle.h
作者: 錢軍洪 Version : 1.0 Date: 2002/12/21
類描述: 對矩形對象的管理
郵件地址:Visual20@sohu.com
***********************************************************/
#ifndef _MAP_RECTANGLE_H_
#define _MAP_RECTANGLE_H_
#include <math.h>
#include "MapPoint.h"
class CMapRectangle {
public:
CMapRectangle();
CMapRectangle(CMapRectangle& MapRectangle );
~CMapRectangle();
//attribute
public:
void SetLeft(double dbLeft) { m_dbLeft = dbLeft;};
void SetRight(double dbRight) { m_dbRight = dbRight;};
void SetTop(double dbTop ) { m_dbTop = dbTop;};
void SetBottom(double dbBottom) { m_dbBottom = dbBottom; };
double GetLeft() { return m_dbLeft; };
double GetRight() { return m_dbRight; }
double GetTop() { return m_dbTop; };
double GetBottom() { return m_dbBottom; };
double GetWidth() { return fabs(m_dbRight-m_dbLeft);};
double GetHeigh() { return fabs(m_dbBottom-m_dbTop);};
//operations
public:
BOOL IsPointIn(CMapPoint& Point);
BOOL IsInsercet(CMapRectangle& rc);
private:
float m_dbLeft;
float m_dbRight;
float m_dbTop;
float m_dbBottom;
};
#endif //_MAP_RECTANGLE_H_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -