clsRect.h 1004 Bytes
/**************************************************************************
* file:              clsRect.h

* Author:            qingxiongf
* Date:              2021-12-12 23:02:19
* Email:             qingxiongf@chinadci.com
* copyright:         广州城市信息研究所有限公司
***************************************************************************/

#ifndef __clsRect_h__
#define __clsRect_h__

#include "dmap_core.h"

namespace DmapCore_30
{
	class CORE_EXPORT Rect
	{
	public:
		Rect();
		~Rect();
		Rect(double top, double right, double bottom, double left);
		bool AddRef();
		bool Release();
		static Rect * CreateNew();
		static Rect * CreateNew(double top, double right, double bottom, double left);

		bool GetExtent(double &x1, double& x2, double &y1, double &y2);

		bool Normal();
		bool Scale(double num); // 放大 2倍 num=2 缩小两倍 num = 0.5
		double GetArea();

		double m_dLeft;
		double m_dRight;
		double m_dTop;
		double m_dBottom;
	};
}


#endif // __clsRect_h__