12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- #pragma once
- #include "Domain.h"
- namespace OTSCLRINTERFACE {
- using namespace System;
- using namespace System::Drawing;
- using namespace OTSDATA;
- public ref class CDomainClr
- {
- public:
- CDomainClr(); // constructor
- CDomainClr(CDomainPtr); // copy constructor
- CDomainClr(int a_nShape, System::Drawing::Rectangle^ a_rectDomain); // copy constructor
- // =operator
-
- ~CDomainClr();
-
- CDomainClr(CDomain*);
- void MyDispose(); // validation check
- virtual bool IsInvalid();
- // check if it is empty
- bool IsEmpty();// { return m_rectDomain->IsEmpty; }
- // check if this is a round domain
- bool IsRound();// { return m_nShape == (int)DOMAIN_SHAPE::ROUND; }
- // check if this is a rectangle domain
- bool IsRect();// { return m_nShape == (int)DOMAIN_SHAPE::RECTANGLE; }
- // domain center
- System::Drawing::Point GetDomainCenter();
- void OffsetDomain(System::Drawing::Point a_poiMove);
- // diameter
- long GetDiameter();// { return m_rectDomain->Width; }
- // check if have common area with the given domain
- bool IntersectDomain(CDomainClr^ a_oDomain);
- // check if the point in the domain
- bool PtInDomain(System::Drawing::Point^ a_poiCheck);
- // Get and set shape
- void SetShape(int a_nShape);// { m_nShape = a_nShape; }
- int GetShape();// { return m_nShape; }
-
- // get and set domain rectangle
- void SetRectDomain(System::Drawing::Rectangle a_oRect);// { m_rectDomain = a_oRect; }
- System::Drawing::Rectangle GetRectDomain();// { return m_rectDomain; }
- // check if the given domain is in the domain
- bool DomainInDomain(CDomainClr^ a_oDomain);
- // get domain pointer
- CDomainPtr GetDomainPtr();
- // PolygonPoint
- System::Collections::Generic::List<System::Drawing::Point>^ GetPolygonPoint();
- void SetPolygonPoint(System::Collections::Generic::List<System::Drawing::Point>^ a_PolygonPoint);
- private:
-
- CDomainPtr *m_LpDomain;
- };
- }
|