#pragma once #include "BSEImg.h" using namespace System; using namespace System::Drawing; namespace OTSCLRINTERFACE { using namespace OTSDATA; extern const unsigned int CHART_NUM; public ref class CBSEImgClr : public Object { public: CBSEImgClr(System::Drawing::Rectangle^); // constructor // copy constructor CBSEImgClr(CBSEImgPtr); CBSEImgClr(CBSEImgClr^); // copy constructor CBSEImgClr(CBSEImg*); //CBSEImgClr^ operator=(const CBSEImgClr^); // =operator ~CBSEImgClr(); !CBSEImgClr(); // image rectangle System::Drawing::Rectangle^ GetImageRect(); void SetImageRect(System::Drawing::Rectangle^ a_pRect); int GetWidth(); int GetHeight(); // image data void InitImageData(int imgwidth, int imgheight); cli::array^ GetImageDataPtr(); void SetImageData(cli::array^ a_pnImageData, int imgwidth, int imgheight); int GetImageSize(); // BSE chart // NOTE: to use chart data, call SetChartData method first! bool SetChartData(); void GetBSEChart(cli::array^ %); long CalBSEChartHigh(); long CalBSEChartLow(); // cal BSE value by position int GetBSEValue(System::Drawing::Point^ a_position); int GetBSEValue(const int a_nX, const int a_nY); void SetBSEValue(const int a_nX, const int a_nY, int value); int GetValueDirect(System::Drawing::Point^ a_position); int GetValueDirectF(int inX, int inY); bool DoesContainPixelValue(int inValue, int a_nPixel); // cal area DWORD CalArea(); CBSEImgPtr GetBSEImgPtr(); protected: CBSEImgClr(); CBSEImgPtr *m_LpBSEImg; }; }