Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class RRegion

RRegion

Support

Supported from 5.0

Description

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.

Derivation

RRegionExpandable region
TRegionClipping region -- abstract base class

Defined in RRegion:
CheckSpare(), Close(), Destroy(), RRegion()

Inherited from TRegion:
AddRect(), BoundingRect(), CheckError(), Clear(), ClipRect(), Contains(), Copy(), Count(), ForceError(), Intersect(), Intersection(), IsContainedBy(), IsEmpty(), Offset(), RectangleList(), Sort(), SubRect(), SubRegion(), Tidy(), Union(), operator[]()


Constructors


RRegion()

RRegion();

Description

Constructs a default TRegion, initialising its granularity to five.


RRegion()

RRegion(TInt aGran);

Description

Constructs the object with the specified granularity.

Parameters

TInt aGran

The initial value for the region’s granularity. This value must not be negative.


RRegion()

RRegion(const RRegion& aRegion);

Description

Copy constructor — constructs a new TRegion object from an existing one.

Parameters

const RRegion& aRegion

The region to be copied.


RRegion()

RRegion(const TRect& aRect,TInt aGran=EDefaultGranularity);

Description

Constructs the object with the specified rectangle and a granularity. The resulting region consists of the specified single rectangle.

Parameters

const TRect& aRect

The single rectangle with which to initialise the region

TInt aGran

The initial value for the region’s granularity. By default, five.

[Top]


Memory cleanup


Close()

void Close();

Description

Clears 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.


Destroy()

void Destroy();

Description

Deletes the region.

Frees all memory.


CheckSpare()

TInt CheckSpare() const;

Description

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.

Return value

TInt

The number of free memory slots in the region.