Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cSurfaceDiff Class Reference

#include <cSurfaceDiff.h>

Inheritance diagram for GrayLib::cSurfaceDiff:
GrayLib::cRegion Gray::CObject

Public Member Functions

 cSurfaceDiff (void)
 
 ~cSurfaceDiff (void)
 
HRESULT ComputeDiff (const cSurfaceBase *pOrig, const cSurfaceBase *pNew)
 
- Public Member Functions inherited from GrayLib::cRegion
 cRegion (const cRectI &rect)
 
 cRegion ()
 
virtual ~cRegion ()
 
virtual bool isValidCheck () const noexcept
 < memory allocation and structure definitions are valid. More...
 
bool isRegionEmpty () const
 
void EmptyRegion ()
 
void AddRegion (const cRegion *pRegionTest)
 
bool SubtractRegion (const cRegion *pRegionTest)
 
void SetRegionSubtract (const cRectI &rect1, const cRectI &rect2)
 
const cRectIget_RectUnion () const
 
void put_RectUnion (const cRectI &rect)
 
ITERATE_t get_RegionRectCount () const
 
const cRectIGetRegionRect (ITERATE_t i) const
 
cRectIRefRegionRect (ITERATE_t i)
 
virtual bool AddRegionRect (const cRectI &rect)
 
virtual void RemoveRegionRect (ITERATE_t i)
 
bool SubtractRegionRect (const cRectI &rect)
 
void OptimizeRegionRects ()
 
cPoint2i GetRegionCorner (DIR_TYPE eDir=DIR_QTY) const
 
bool PtInRegion (int x, int y) const
 
bool PtInRegion (const cPoint2i &pt) const
 
bool IsOverlapped (const cRectI &rect) const
 
bool IsInsideMe (const cRectI &rect) const
 
bool IsInsideMe (const cRegion *pRegionIsSmaller) const
 
bool IsOverlapped (const cRegion *pRegionTest) const
 
bool IsEqualRegion (const cRegion *pRegionTest) const
 
HRESULT v_SetRegion (const cVariant &vVal)
 
void v_GetRegion (cVariant &vVal) const
 
 UNITTEST_FRIEND (cRegion)
 
- Public Member Functions inherited from Gray::CObject
virtual ~CObject ()
 
virtual void AssertValid () const
 < memory allocation and structure definitions are valid. More...
 
virtual void Serialize (cArchive &a)
 

Static Public Attributes

static const int k_SizeMin = 32
 Min block size. More...
 

Additional Inherited Members

- Protected Attributes inherited from GrayLib::cRegion
cRectI m_rectUnion
 The union rectangle. (may have holes in it of course) More...
 

Detailed Description

Todo:
Compute the rectangles of change from one surface/image to the next.

Constructor & Destructor Documentation

◆ cSurfaceDiff()

GrayLib::cSurfaceDiff::cSurfaceDiff ( void  )

◆ ~cSurfaceDiff()

GrayLib::cSurfaceDiff::~cSurfaceDiff ( void  )

Member Function Documentation

◆ ComputeDiff()

HRESULT GrayLib::cSurfaceDiff::ComputeDiff ( const cSurfaceBase pOrig,
const cSurfaceBase pNew 
)
Todo:
Get dirty rectangles indicating diff between to surfaces.
Returns
0 = no changes. <0 = error. not same formats ? not same size ? >0 = number of rectangles in pNew that have changed.

Member Data Documentation

◆ k_SizeMin

const int GrayLib::cSurfaceDiff::k_SizeMin = 32
static

Min block size.


The documentation for this class was generated from the following files: