SapBufferRoi.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef _SAPBUFFER_ROI_H_
  2. #define _SAPBUFFER_ROI_H_
  3. // SapBufferRoi.h : header file
  4. //
  5. #include "SapClassBasicDef.h"
  6. //
  7. // SapBufferRoi class declaration
  8. //
  9. class SAPCLASSBASIC_CLASS SapBufferRoi : public SapBuffer
  10. {
  11. public:
  12. // Constructor/Destructor
  13. SapBufferRoi(SapBuffer *pParent, int xmin=0, int ymin=0, int width=-1, int height=-1);
  14. virtual ~SapBufferRoi();
  15. // Module create/destroy
  16. virtual BOOL Create();
  17. virtual BOOL Destroy();
  18. // Access to implementation
  19. SapBuffer *GetParent() { return m_pParent; }
  20. SapBuffer *GetRoot();
  21. virtual CORBUFFER GetTrash() const { return m_hTrashChild; }
  22. int GetXMin() const { return m_XMin; }
  23. int GetYMin() const { return m_YMin; }
  24. virtual BOOL SetParent(SapBuffer *pParent);
  25. virtual BOOL SetXMin(int xmin);
  26. virtual BOOL SetYMin(int ymin);
  27. virtual BOOL SetParametersFromFile(const char *filename, Type type) { return FALSE; }
  28. virtual BOOL SetRoi(int xmin, int ymin, int width, int height);
  29. virtual BOOL SetRoi(RECT *pRect);
  30. virtual BOOL ResetRoi();
  31. protected:
  32. SapBuffer *m_pParent;
  33. CORBUFFER m_hTrashChild; // Child buffer for trash
  34. int m_XMin; // Minimum X position
  35. int m_YMin; // Minimum Y position
  36. };
  37. #endif // _SAPBUFFER_ROI_H_