|
|
|
class RRegion : public TRegion;
Expandable region.
This class provides for the construction and destruction of a TRegion, including a granularity for expanding the region. A region;s granularity represents the number of memory slots allocated
when the object is created, and the number of new memory slots allocated each time an RRegion is expanded beyond the number
of free slots. The default granularity is five.
TRegion -
Clipping region - abstract base class.
RRegion -
Expandable region.
Defined in RRegion:
CheckSpare()constGets the number of free memory slots in the region.Close()Closes the region.Destroy()Deletes the region.RRegion()Default constructor.RRegion(TInt)Constructs the object with the specified granularity.RRegion(TInt,TInt)RRegion(TInt,TRect *,TInt)Constructor that takes ownership of an already created rectangle list.RRegion(const RRegion &)Copy constructor.RRegion(const TRect &,TInt)Constructs the object with the specified rectangle and granularity.Inherited from TRegion:
AddRect(const TRect &)Adds a rectangle to this region.BoundingRect()constGets the minimal rectangle that bounds the entire region.CheckError()constTests whether the region's error flag is set.Clear()Clears this region.ClipRect(const TRect &)Clips the region to the specified rectangle.Contains(const TPoint &)constTests whether a point is located within the region.Copy(const TRegion &)Copies another region to this region.Count()constGets the number of rectangles in this region.ERRegionBufForceError()Sets the error flag, and clears the region.Intersect(const TRegion &)Replaces this region with the area of intersection between it and the specified ...Intersection(const TRegion &,const TRegion &)Replaces this region with the area of intersection between two specified regions...Intersects(const TRect &)constTests whether where there is any intersection between this region and the specif...IsContainedBy(const TRect &)constTests whether the region is fully enclosed within the specified rectangle.IsEmpty()constTests whether the region is empty.Offset(TInt,TInt)Moves the region by adding X and Y offsets to the co-ordinates of its corners.Offset(const TPoint &)Moves the region by adding a TPoint offset to the co-ordinates of its corners.RectangleList()constGets a pointer to the array of rectangles defining this region.RectangleListW()Sort()Sorts the region's array of rectangles according to their vertical position on t...Sort(const TPoint &)Sorts the region's array of rectangles according to a specified sort order.SubRect(const TRect &,TRegion *)Removes a rectangle from this region.SubRegion(const TRegion &,TRegion *)Removes a region.TRegion(TInt)Tidy()Merges all rectangles within this region which share an adjacent edge of the sam...Union(const TRegion &)Replaces this region with the union of it and the specified region.anonymousiAllocedRectsiCountiErroroperator[](TInt)constGets a rectangle from the region.IMPORT_C RRegion(TInt aGran);
Constructs the object with the specified granularity.
|
IMPORT_C RRegion(const RRegion &aRegion);
Copy constructor.
Constructs a new region from an existing one by performing a bit-wise copy. Both the new and existing regions are left containing
pointers to the same data, so RRegion::Close() must only be called on one of them.
Use of this method is not reccomended.
|
IMPORT_C RRegion(const TRect &aRect, TInt aGran=EDefaultGranularity);
Constructs the object with the specified rectangle and granularity.
The resulting region consists of the specified single rectangle.
|
IMPORT_C RRegion(TInt aCount, TRect *aRectangleList, TInt aGran=EDefaultGranularity);
Constructor that takes ownership of an already created rectangle list.
|
IMPORT_C void Close();
Closes the region.
Frees up any memory which has been allocated, and unsets the error flag, if set.
The region is not deleted, so that it can be re-used. Its granularity is preserved.
IMPORT_C void Destroy();
Deletes the region.
Frees all memory.
Note this method will delete the RRegion object and therefore it should not be invoked on RRegion objects that are not allocated
on the heap. RRegion::Close() should be used for RRegion objects stored on the stack.
|
inline TInt CheckSpare() const;
Gets the number of free memory slots in the region.
This is the number of slots which have been allocated, minus the number in use.
|