|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
Region with pre-allocated buffer. More...
#include <e32std.h>
Public Member Functions | |
| RRegionBuf () | |
| Constructs a default object. | |
| RRegionBuf (const RRegion &aRegion) | |
| Constructs this object from the specified RRegion. | |
| RRegionBuf (const RRegionBuf< S > &aRegion) | |
| Copy constructs from an existing RRegionBuf object. | |
| RRegionBuf (const TRect &aRect) | |
| Constructs an RRegionBuf with a TRect. | |
Public Member Functions inherited from RRegion | |
| IMPORT_C | RRegion () |
| Default constructor. | |
| IMPORT_C | RRegion (TInt aGran) |
| Constructs the object with the specified granularity. | |
| IMPORT_C | RRegion (const RRegion &aRegion) |
| Copy constructor. | |
| IMPORT_C | RRegion (const TRect &aRect, TInt aGran=EDefaultGranularity) |
| Constructs the object with the specified rectangle and granularity. | |
| 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. | |
| IMPORT_C void | Destroy () |
| Deletes the region. | |
| TInt | CheckSpare () const |
| Gets the number of free memory slots in the region. | |
Public Member Functions inherited from TRegion | |
| TInt | Count () const |
| Gets the number of rectangles in this region. | |
| const TRect * | RectangleList () const |
| Gets a pointer to the array of rectangles defining this region. | |
| TBool | CheckError () const |
| Tests whether the region's error flag is set. | |
| IMPORT_C TBool | IsEmpty () const |
| Tests whether the region is empty. | |
| IMPORT_C TRect | BoundingRect () const |
| Gets the minimal rectangle that bounds the entire region. | |
| IMPORT_C const TRect & | operator[] (TInt aIndex) const |
| Gets a rectangle from the region. | |
| IMPORT_C void | Copy (const TRegion &aRegion) |
| Copies another region to this region. | |
| IMPORT_C void | AddRect (const TRect &aRect) |
| Adds a rectangle to this region. | |
| IMPORT_C void | SubRect (const TRect &aRect, TRegion *aSubtractedRegion=NULL) |
| Removes a rectangle from this region. | |
| IMPORT_C void | Offset (TInt aXoffset, TInt aYoffset) |
| Moves the region by adding X and Y offsets to the co-ordinates of its corners. | |
| IMPORT_C void | Offset (const TPoint &aOffset) |
| Moves the region by adding a TPoint offset to the co-ordinates of its corners. | |
| IMPORT_C void | Union (const TRegion &aRegion) |
| Replaces this region with the union of it and the specified region. | |
| IMPORT_C void | Intersection (const TRegion &aRegion, const TRegion &aRegion2) |
| Replaces this region with the area of intersection between two specified regions. | |
| IMPORT_C void | Intersect (const TRegion &aRegion) |
| Replaces this region with the area of intersection between it and the specified region. | |
| IMPORT_C void | SubRegion (const TRegion &aRegion, TRegion *aSubtractedRegion=NULL) |
| Removes a region. | |
| IMPORT_C void | ClipRect (const TRect &aRect) |
| Clips the region to the specified rectangle. | |
| IMPORT_C void | Clear () |
| Clears this region. | |
| IMPORT_C void | Tidy () |
| Merges all rectangles within this region which share an adjacent edge of the same length. | |
| IMPORT_C TInt | Sort () |
| Sorts the region's array of rectangles according to their vertical position on the screen. | |
| IMPORT_C TInt | Sort (const TPoint &aOffset) |
| Sorts the region's array of rectangles according to a specified sort order. | |
| IMPORT_C void | ForceError () |
| Sets the error flag, and clears the region. | |
| IMPORT_C TBool | IsContainedBy (const TRect &aRect) const |
| Tests whether the region is fully enclosed within the specified rectangle. | |
| IMPORT_C TBool | Contains (const TPoint &aPoint) const |
| Tests whether a point is located within the region. | |
| IMPORT_C TBool | Intersects (const TRect &aRect) const |
| Tests whether where there is any intersection between this region and the specified rectangle. | |
Additional Inherited Members | |
Protected Types inherited from TRegion | |
| enum | { ERRegionBuf =0x40000000 } |
Protected Member Functions inherited from RRegion | |
| IMPORT_C | RRegion (TInt aBuf, TInt aGran) |
Protected Member Functions inherited from TRegion | |
| IMPORT_C TRect * | RectangleListW () |
| IMPORT_C | TRegion (TInt aAllocedRects) |
| TRegion () | |
| TBool | SetListSize (TInt aCount) |
| Ensure that the region is big enough to hold aCount rectangles. | |
| void | AppendRect (const TRect &aRect) |
| void | DeleteRect (TRect *aRect) |
| void | AppendRegion (TRegion &aRegion) |
| void | MergeRect (const TRect &aRect, TBool aEnclosed) |
| Merges a rectangle with this region. | |
| void | SubtractRegion (const TRegion &aRegion, TRegion *aSubtractedRegion=NULL) |
| Removes a region. | |
| void | ShrinkRegion () |
| After an RRegion's iCount has reduced try to release some memory. | |
| TRect * | ExpandRegion (TInt aCount) |
| Ensure that the region is big enough to hold aCount rectangles. | |
Protected Attributes inherited from TRegion | |
| TInt | iCount |
| TBool | iError |
| TInt | iAllocedRects |
Region with pre-allocated buffer.
This class provides the functionality of an RRegion, but in addition, for optimisation purposes, uses a buffer containing pre-allocated space for as many rectangles as are specified in the granularity.
When this buffer is full, cell allocation takes place as for an RRegion, and the RRegionBuf effectively becomes an RRegion. In this case, the region does not revert to using the buffer, even if the region were to shrink so that the buffer could, once again, contain the region. When the region is no longer required, call Close(), defined in the base class RRegion, to free up all memory.
|
inline |
Constructs a default object.
The granularity is the value of the template parameter.
(generated from Symbian Developer Library)
|
inline |
Constructs this object from the specified RRegion.
| aRegion | The region to assign to this RRegionBuf. |
(generated from Symbian Developer Library)
|
inline |
Copy constructs from an existing RRegionBuf object.
| aRegion | The RRegionBuf to be copied. |
(generated from Symbian Developer Library)
|
inline |
Constructs an RRegionBuf with a TRect.
Its granularity is initialised to the value contained in the template argument. The resulting region consists of the specified single rectangle.
| aRect | The single rectangle with which to initialise the region. |
(generated from Symbian Developer Library)