DrawUtils Class Reference

class DrawUtils

Provides static functions for drawing text in a rectangle.

Public Member Functions
IMPORT_C voidClearBetweenRects(CGraphicsContext &, const TRect &, const TRect &)
IMPORT_C voidDrawBetweenRects(CGraphicsContext &, const TRect &, const TRect &)
IMPORT_C voidDrawText(CGraphicsContext &, const TDesC &, const TRect &, TInt, CGraphicsContext::TTextAlign, TInt, const CFont *)

Member Functions Documentation

ClearBetweenRects(CGraphicsContext &, const TRect &, const TRect &)

IMPORT_C voidClearBetweenRects(CGraphicsContext &aGc,
const TRect &aOuterRect,
const TRect &aInnerRect
)[static]

Clears between two rectangles, using a solid brush style and no pen.

Parameters

CGraphicsContext & aGcThe graphics context.
const TRect & aOuterRectThe outer rectangle.
const TRect & aInnerRectThe inner rectangle.

DrawBetweenRects(CGraphicsContext &, const TRect &, const TRect &)

IMPORT_C voidDrawBetweenRects(CGraphicsContext &aGc,
const TRect &aOuterRect,
const TRect &aInnerRect
)[static]

Draws between two rectangles.

The pen and brush settings are used as specified in the graphics context.

Parameters

CGraphicsContext & aGcThe graphics context.
const TRect & aOuterRectThe outer rectangle to be drawn.
const TRect & aInnerRectThe inner rectangle to be drawn.

DrawText(CGraphicsContext &, const TDesC &, const TRect &, TInt, CGraphicsContext::TTextAlign, TInt, const CFont *)

IMPORT_C voidDrawText(CGraphicsContext &aGc,
const TDesC &aString,
const TRect &aBox,
TIntaBaseLineOffset,
CGraphicsContext::TTextAlignaHoriz,
TIntaMargin,
const CFont *aFont
)[static]

Draws text inside a rectangle.

Parameters

CGraphicsContext & aGcThe graphics context.
const TDesC & aStringThe text string to draw.
const TRect & aBoxThe rectangle to draw the text in.
TInt aBaseLineOffsetAn offset from the top of the box to the text baseline.
CGraphicsContext::TTextAlign aHorizThe horizontal text alignment.
TInt aMarginThe margin around the text.
const CFont * aFontThe font to use.