TSurfaceConfiguration1 Class Reference

class TSurfaceConfiguration1 : public TSurfaceConfigurationSize

The first set of surface configuration attributes containing the surface id, viewport, extent and orientation of the surface, along with a SupportsAllMembers function to help identify which attributes are available.

Inherits from

Constructor & Destructor Documentation

TSurfaceConfiguration1()

TSurfaceConfiguration1 ( ) [inline]

Default constructor for configuration 1

TSurfaceConfiguration1(TInt)

TSurfaceConfiguration1 ( TInt aSize ) [protected, inline]

Constructor for configuration 1 passing through a size already calculated

Parameters

TInt aSize Size of the class already calculated and being passed up through the classes

TSurfaceConfiguration1(const TSurfaceConfiguration1 &)

TSurfaceConfiguration1 ( const TSurfaceConfiguration1 & ) [private, inline]

Parameters

const TSurfaceConfiguration1 &

Member Functions Documentation

GetExtent(TRect &)

void GetExtent ( TRect & aExtent ) const [inline]

The method gets the extent stored in the object of this class. The extent is in window coordinates.

If extent was not set or an empty extent was set, the value returned will be an empty extent. This is an indication that the extent used by the server is equal to the size of the window. The actual size of the window is not returned.

Post-condition
The aExtent parameter is filled in
If the instance of TSurfaceConfiguration is too small, the empty extent rectangle will be returned.

Parameters

TRect & aExtent User extent to be set

GetSurfaceId(TSurfaceId &)

void GetSurfaceId ( TSurfaceId & aSurfaceId ) const [inline]

The method gets the surface ID stored in the object of this class.

Post-condition
The aSurface parameter is filled in.
If the instance of TSurfaceConfiguration is too small, the null surface ID will be set.

Parameters

TSurfaceId & aSurfaceId User surface id to be set

GetViewport(TRect &)

void GetViewport ( TRect & aViewport ) const [inline]

This method gets the viewport stored in the object of this class. The viewport is in surface coordinates.

If viewport was not set or an empty viewport was set, the value returned is an empty viewport. This is an indication that the viewport used by the server is equal to the size of the surface. The actual size of the surface is not returned.

Post-condition
The aViewport rectangle is filled in.
If the instance of TSurfaceConfiguration is too small, the empty viewport rectangle will be returned.

Parameters

TRect & aViewport User viewport to be set.

Orientation()

CFbsBitGc::TGraphicsOrientation Orientation ( ) const [inline]

The method gets the surface orientation angle stored in the object of this class. It is the relative orientation of viewport to window extent. If orientation was not set, the value returned will be EGraphicsOrientationNormal.

Post-condition
If the instance of TSurfaceConfiguration is too small, the default EGraphicsOrientationNormal setting will be returned.

SetExtent(const TRect &)

TInt SetExtent ( const TRect & aExtent ) [inline]

This method sets the area of the window where the surface content is to be placed. The extent is in window coordinates.

If not set or if the set extent is empty, the size of the entire window is used as the default extent. The default extent changes according to the change in the window size. The empty extent is an indication to the server that the extent should fill the entire window without the client tracking the change in the window size.

In SetBackgroundSurface() it is legal to set the extent larger than the window, or the window may become smaller than the extent. In these cases the output will be transformed on the basis of this larger extent, but then clipped to the window outline.

Post-condition
The extent values are updated in the object of this class. This does not imply that the extent is set for the surface. The SetBackgroundSurface API must be called passing an object of this class as parameter to get the desired effect.

Parameters

const TRect & aExtent Area on the window where the surface contents specified by viewport should be mapped

SetOrientation(CFbsBitGc::TGraphicsOrientation)

TInt SetOrientation ( CFbsBitGc::TGraphicsOrientation aOrientation ) [inline]

This method sets the relative orientation of viewport to window extent. The default value is EGraphicsOrientationNormal.

The rotation effect is applied to the input viewport area, around the centre-point of the viewport.

Post-condition
The orientation is updated in the object of this class. This does not imply that the orientation is set for the surface content. The SetBackgroundSurface API must be called passing an object of this class as parameter to get the desired effect.

Parameters

CFbsBitGc::TGraphicsOrientation aOrientation User orientation to be set

SetSurfaceId(const TSurfaceId &)

TInt SetSurfaceId ( const TSurfaceId & aSurfaceId ) [inline]

The method sets the surface ID to be set as the background surface.

The default initial value held in this class for surface ID is the null surface ID.

Note that SetBackgroundSurface() will not accept a null surface ID, so this parameter must always be set.

Post-condition
The Surface Id values are updated in the object of this class if supported. The SetBackgroundSurface API must be called passing object of this class as parameter to get the desired effect.

Parameters

const TSurfaceId & aSurfaceId Surface ID to set

SetViewport(const TRect &)

TInt SetViewport ( const TRect & aViewport ) [inline]

The method sets the area of the surface that should be mapped to the specified window area. The viewport is in surface coordinates.

In SetBackgroundSurface(), if not set or if the set viewport is empty, the size of the whole surface is used as the viewport. If the surface is changed then the viewport will track the size of the surface.

Setting any ordinate of the viewport outside the surface size is not required specified behavior for this interface. The call will not fail if any ordinates are out of range, and the internal NGA Composition handling of this case will produce a representative image. This current behavior is that the NGA Composition will clamp any out-of-range ordinate to the size of the surface.

Post-condition
The viewport values are updated in the object of this class. This does not imply that the viewport is set for the surface. The SetBackgroundSurface API must be called passing an object of this class as parameter to get the desired effect.

Parameters

const TRect & aViewport A rectangle of the area, in relative coordinates to the surface

SupportsAllMembers()

TBool SupportsAllMembers ( ) [inline]

This method identifies which attributes are available to use.

Generally, any version of the server will accept any version of TSurfaceConfiguration , ignoring newer version attributes it does not recognize and substituting defaults for attributes not present in older version.

However, by using this method in conjunction with GetBackgroundSurface() the intelligent client can identify which blocks of attributes are actually present and supported after a call to GetBackgroundSurface, avoiding preparing complex attributes, or reducing user-interface control gadgets.

operator=(const TSurfaceConfiguration1 &)

TSurfaceConfiguration1 operator= ( const TSurfaceConfiguration1 & ) const [private, inline]

Parameters

const TSurfaceConfiguration1 &

operator==(const TSurfaceConfiguration1 &)

TBool operator== ( const TSurfaceConfiguration1 & aRhs ) const [protected, inline]

Parameters

const TSurfaceConfiguration1 & aRhs

Member Data Documentation

TRect iExtent

TRect iExtent [private]

CFbsBitGc::TGraphicsOrientation iOrientation

CFbsBitGc::TGraphicsOrientation iOrientation [private]

TSurfaceId iSurfaceId

TSurfaceId iSurfaceId [private]

TRect iViewport

TRect iViewport [private]