MWsDrawResource Class Reference
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)
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
& aPos
|
The position of the top-left corner on a window.
|
const
RWsDrawableSource
& aSource
|
The resource to be drawn.
|
CWindowGc::TGraphicsRotation
aRotation = CWindowGc::EGraphicsRotationNone
|
The rotation to be applied to the resource before it is drawn. The default value is CWindowGc::EGraphicsRotationNone.
|
DrawResource(const TRect &, const RWsDrawableSource &, CWindowGc::TGraphicsRotation)
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
& aDestRect
|
Destination rectangle to which the resource will be rendered.
|
const
RWsDrawableSource
& aSource
|
The resource to be drawn.
|
CWindowGc::TGraphicsRotation
aRotation = CWindowGc::EGraphicsRotationNone
|
The 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)
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
& aDestRect
|
The destination rectangle to which the resource will be rendered on a window.
|
const
RWsDrawableSource
& aSource
|
The resource to draw.
|
const
TRect
& aSrcRect
|
The source rectangle specifying the area/sub-area of the resource to be rendered.
|
CWindowGc::TGraphicsRotation
aRotation = CWindowGc::EGraphicsRotationNone
|
Rotation to be applied to the resource before it is drawn. The default value is CWindowGc::EGraphicsRotationNone.
|
DrawResource(const TRect &, const RWsDrawableSource &, const TDesC8 &)
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
& aDestRect
|
The destination rectangle to which the resource will be rendered on a window.
|
const
RWsDrawableSource
& aSource
|
The resource.
|
const
TDesC8
& aParam
|
Parameters specifying how to draw the resource.
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.