MWsDrawResource Class Reference

class MWsDrawResource

An extension interface for CWindowGc and CRemoteGc to draw RWsDrawableSources.

Usage:
MWsDrawResource* gcDrawResource = static_cast<MWsDrawResource*>(gc->Interface(KMWsDrawResourceInterfaceUid));
if(gcDrawResource)
	{
	gcDrawResource->DrawResource(TPoint(5,5), drawableSource);
	}
RWsDrawableSource CWindowGc::Interface

Member Functions Documentation

DrawResource(const TPoint &, const RWsDrawableSource &, CWindowGc::TGraphicsRotation)

voidDrawResource(const TPoint &aPos,
const RWsDrawableSource &aSource,
CWindowGc::TGraphicsRotationaRotation = CWindowGc::EGraphicsRotationNone
)[pure virtual]

Draws an image based resource which may be generated using non-native rendering API such as OpenGL ES or OpenVG. The resource will be drawn at the specified position in its original size with orientation according to the specified rotation parameter. The current clipping region applies.

RWsDrawableSource
Pre-condition
Drawing context has been activated on a window. The drawable source has been created.
Post-condition
Request to draw resource has been accepted. There is no guarantee that the request has been completed when this method returns.

Parameters

const TPoint & aPosThe position of the top-left corner on a window.
const RWsDrawableSource & aSourceThe resource to be drawn.
CWindowGc::TGraphicsRotation aRotation = CWindowGc::EGraphicsRotationNoneThe rotation to be applied to the resource before it is drawn. The default value is CWindowGc::EGraphicsRotationNone.

DrawResource(const TRect &, const RWsDrawableSource &, CWindowGc::TGraphicsRotation)

voidDrawResource(const TRect &aDestRect,
const RWsDrawableSource &aSource,
CWindowGc::TGraphicsRotationaRotation = CWindowGc::EGraphicsRotationNone
)[pure virtual]

Draws an image based resource. The resource will be rendered to the given destination rectangle on the window in its original dimensions with orientation according to the specified rotation parameter. Drawing will be clipped to the given destination rectangle. The current clipping region applies. The resource can be drawn rotated using the CWindowGc::TGraphicsRotation enum which defines possible rotation values in clockwise degrees.

RWsDrawableSource
Pre-condition
Drawing context has been activated on a window. The drawable source has been created.
Post-condition
Request to draw resource has been accepted. There is no guarantee that the request has been completed when this method returns.

Parameters

const TRect & aDestRectDestination rectangle to which the resource will be rendered.
const RWsDrawableSource & aSourceThe resource to be drawn.
CWindowGc::TGraphicsRotation aRotation = CWindowGc::EGraphicsRotationNoneThe rotation to be applied to the resource before it is drawn. The default value is CWindowGc::EGraphicsRotationNone.

DrawResource(const TRect &, const RWsDrawableSource &, const TRect &, CWindowGc::TGraphicsRotation)

voidDrawResource(const TRect &aDestRect,
const RWsDrawableSource &aSource,
const TRect &aSrcRect,
CWindowGc::TGraphicsRotationaRotation = CWindowGc::EGraphicsRotationNone
)[pure virtual]

Draws an image based resource. The resource is rendered into the given destination rectangle on a window. Scaling (stretching or compression) applies if the destination rectangle is different from the source rectangle. The resource orientation is set based on the specified rotation parameter before scaling and drawing operations are performed.

RWsDrawableSource
Pre-condition
Drawing context has been activated on a window. The drawable source has been created.
Post-condition
Request to draw an image based resource has been accepted. There is no guarantee that the request has been completed when this method returns.

Parameters

const TRect & aDestRectThe destination rectangle to which the resource will be rendered on a window.
const RWsDrawableSource & aSourceThe resource to draw.
const TRect & aSrcRectThe source rectangle specifying the area/sub-area of the resource to be rendered.
CWindowGc::TGraphicsRotation aRotation = CWindowGc::EGraphicsRotationNoneRotation to be applied to the resource before it is drawn. The default value is CWindowGc::EGraphicsRotationNone.

DrawResource(const TRect &, const RWsDrawableSource &, const TDesC8 &)

voidDrawResource(const TRect &aDestRect,
const RWsDrawableSource &aSource,
const TDesC8 &aParam
)[pure virtual]

Draws a non-image based resource. The resource will be rendered into the given destination rectangle on a window. The current clipping region applies. The adaptation is free to interpret the parameter aParam and may define its own rules on how to handle the rendering of a non-image based resource.

RWsDrawableSource
Pre-condition
Drawing context has been activated on a window. The drawable source has been created.
Post-condition
Request to draw a non-image based resource has been accepted. There is no guarantee that the request has been completed when this method returns.

Parameters

const TRect & aDestRectThe destination rectangle to which the resource will be rendered on a window.
const RWsDrawableSource & aSourceThe resource.
const TDesC8 & aParamParameters specifying how to draw the resource.