22#include <displaymode.h>
24#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
25#include <graphics/gdi/glyphsample.h>
26#include <graphics/gdi/gdiconsts.h>
29class TOpenFontCharMetrics;
61#if defined(__NO_CLASS_CONSTS__)
67#define KA4PaperSizeInTwips TSize(11906,16838)
73#define KLegalPaperSizeInTwips TSize(12240,20160)
80#define KExecutivePaperSizeInTwips TSize(10440,15120)
86#define KLetterPaperSizeInTwips TSize(12240,15840)
93#define KCom_10PaperSizeInTwips TSize(5940,13680)
100#define KMonarchPaperSizeInTwips TSize(5580,10800)
107#define KDLPaperSizeInTwips TSize(6236,12472)
114#define KC5PaperSizeInTwips TSize(9184,12983)
195 inline TRgb(TUint32 aValue);
196 inline TRgb(TUint32 aInternalValue, TInt aAlpha);
197 inline TRgb(TInt aRed,TInt aGreen,TInt aBlue);
198 inline TRgb(TInt aRed, TInt aGreen, TInt aBlue, TInt aAlpha);
199 inline TInt
Red()
const;
200 inline TInt
Green()
const;
201 inline TInt
Blue()
const;
202 inline TInt
Alpha()
const;
203 IMPORT_C
void SetRed(TInt aRed);
204 IMPORT_C
void SetGreen(TInt aGreen);
205 IMPORT_C
void SetBlue(TInt aBlue);
206 IMPORT_C
void SetAlpha(TInt aAlpha);
216 IMPORT_C TInt
Gray2()
const;
217 IMPORT_C TInt
Gray4()
const;
218 IMPORT_C TInt
Gray16()
const;
275#define KRgbBlack TRgb(0x000000)
276#define KRgbDarkGray TRgb(0x555555)
277#define KRgbDarkRed TRgb(0x000080)
278#define KRgbDarkGreen TRgb(0x008000)
279#define KRgbDarkYellow TRgb(0x008080)
280#define KRgbDarkBlue TRgb(0x800000)
281#define KRgbDarkMagenta TRgb(0x800080)
282#define KRgbDarkCyan TRgb(0x808000)
283#define KRgbRed TRgb(0x0000ff)
284#define KRgbGreen TRgb(0x00ff00)
285#define KRgbYellow TRgb(0x00ffff)
286#define KRgbBlue TRgb(0xff0000)
287#define KRgbMagenta TRgb(0xff00ff)
288#define KRgbCyan TRgb(0xffff00)
289#define KRgbGray TRgb(0xaaaaaa)
290#define KRgbWhite TRgb(0xffffff)
291#define KRgbTransparent TRgb(0x000000,0x00)
340 IMPORT_C
void SetEntry(TInt aPaletteIndex,
const TRgb& aPaletteEntry);
341 IMPORT_C
void GetDataPtr(TInt aFirstColor,TInt aNumColors,TPtr8& aPtr);
361 IMPORT_C
void Color256(TUint8* aDestination,
const TRgb* aSource,TInt aNumPixels)
const;
417 IMPORT_C
void JumpToXCoord(
const TInt aXCoord,TInt& aYCoord);
418 IMPORT_C
void JumpToYCoord(TInt& aXCoord,
const TInt aYCoord);
422 void UpdatePosition();
439 TBool iBoundingRectSet;
563 IMPORT_C TBool
IsSerif()
const;
571 void ResetAttributes();
572 void ResetScriptType();
636 EAlgorithmicBold= 0x10,
650 IMPORT_C
static TBool IsEffectOn(TEffect aEffect, TUint32 aFontEffect);
651 IMPORT_C
static void SetEffect(TEffect aEffect, TBool aOn, TUint32& aFontEffect);
678 IMPORT_C
void ExternalizeL(RWriteStream& aStream)
const;
688 IMPORT_C TUint32
Effects()
const;
689 IMPORT_C TBool
IsEffectOn(FontEffect::TEffect aEffect)
const;
691 IMPORT_C
void SetEffects(FontEffect::TEffect aEffect, TBool aOn);
720 IMPORT_C
void ExternalizeL(RWriteStream& aStream)
const;
897 TBool FindFont(
const CFont* aFont, TInt& aIdx)
const;
959 class CFontCacheEntry :
public CBase
962 CFontCacheEntry(
CFont* aFont,
const TFontSpec& aFontSpec,CFontCacheEntry* aNext);
966 CFontCacheEntry* iNext;
971 CFontCacheEntry* iFirst;
1284 class TPositionParam
1361 class TMeasureTextInput
1495 virtual TInt DoHeightInPixels()
const=0;
1500 virtual TInt DoAscentInPixels()
const=0;
1501 IMPORT_C
virtual TInt DoDescentInPixels()
const;
1506 virtual TInt DoCharWidthInPixels(
TChar aChar)
const=0;
1511 virtual TInt DoTextWidthInPixels(
const TDesC& aText)
const=0;
1516 virtual TInt DoBaselineOffsetInPixels()
const=0;
1521 virtual TInt DoTextCount(
const TDesC& aText,TInt aWidthInPixels)
const=0;
1526 virtual TInt DoTextCount(
const TDesC& aText,TInt aWidthInPixels,TInt& aExcessWidthInPixels)
const=0;
1531 virtual TInt DoMaxCharWidthInPixels()
const=0;
1536 virtual TInt DoMaxNormalCharWidthInPixels()
const=0;
1541 virtual TFontSpec DoFontSpecInTwips()
const=0;
1636 IMPORT_C TInt
TextCount(
const TDesC& aText,TInt aWidthInPixels)
const;
1652 IMPORT_C TInt
TextCount(
const TDesC& aText,TInt aWidthInPixels,TInt& aExcessWidthInPixels)
const;
1675 IMPORT_C
static TBool
CharactersJoin(TInt aLeftCharacter, TInt aRightCharacter);
1927 struct TDrawTextParam
2093 virtual void Reset()=0;
2138 IMPORT_C
static TInt
JustificationInPixels(TInt aExcessPixels,TInt aTotalUnits,TInt aFirstUnit,TInt aNumUnits);
2743 virtual void DrawBitmap(
const TPoint& aTopLeft,
const CFbsBitmap* aSource)=0;
2766 virtual void DrawBitmap(
const TRect& aDestRect,
const CFbsBitmap* aSource)=0;
2789 virtual void DrawBitmap(
const TRect& aDestRect,
const CFbsBitmap* aSource,
const TRect& aSourceRect)=0;
2805 virtual void DrawBitmapMasked(
const TRect& aDestRect,
const CFbsBitmap* aBitmap,
const TRect& aSourceRect,
const CFbsBitmap* aMaskBitmap,TBool aInvertMask)=0;
2906 TInt aLeftMargin = 0) = 0;
2921 virtual void MapColors(
const TRect &aRect,
const TRgb *aColors,TInt aNumPairs,TBool aMapForwards) = 0;
2997 IMPORT_C
virtual TInt
APIExtension(
TUid aUid, TAny*& aOutput, TAny* aInput);
3037 virtual void Clear()=0;
3064 virtual void BitBlt(
const TPoint& aPoint,
const CFbsBitmap* aBitmap)=0;
3079 virtual void BitBlt(
const TPoint& aPoint,
const CFbsBitmap* aBitmap,
const TRect& aRect)=0;
3113 virtual void BitBltMasked(
const TPoint& aPoint,
const CFbsBitmap* aBitmap,
const TRect& aSourceRect,
const CFbsBitmap* aMaskBitmap,TBool aInvertMask)=0;
3118 virtual void SetFaded(TBool aFaded)=0;
3233 virtual void GetScanLine(TDes8& aBuf,
const TPoint& aStartPixel,TInt aLength,TDisplayMode aDispMode)
const=0;
3354 IMPORT_C
void ExternalizeL(RWriteStream& aStream)
const;
3453 IMPORT_C
virtual TStreamId
StoreL(CStreamStore& aStore)
const;
3464 virtual void ExternalizeL(RWriteStream& aStream)
const =0;
3470 IMPORT_C
virtual void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight);
3476 IMPORT_C
virtual TBool
LineBreakPossible(TUint aClass,TBool aBeforePicture,TBool aHaveSpaces)
const;
3507 IMPORT_C
void ExternalizeL(RWriteStream& aStream)
const;
3597 IMPORT_C
void ExternalizeL(RWriteStream& aStream)
const;
3703 IMPORT_C
void ExternalizeL(RWriteStream& aStream)
const;
3787class CDictionaryStore;
4033 void DeletePrinterDevice();
4034 void DoOpenPdrL(
const TDesC &aName);
4035 void DoCreatePrinterDeviceL(
TUid aModelUid);
4039 CFileStore *iPdrStore;
4084 void ScanDirectoryL(TInt aDirIndex);
4085 void ListModelsL(TInt aFileIndex,
TParse& aParser,
TFileName& aNameOfLoadedResourceFile,
TFileName& aTempFileName, RResourceFile& aResourceFile, HBufC8*& aResource);
4086 HBufC* NewPathBufL(
const TFileEntry& aFileEntry);
4135#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
4136#include <graphics/gdi/gdistructs.h>
4137#include <graphics/gdi/gdiinline.inl>
Array of fixed length objects contained within a flat dynamic buffer.
Array of fixed length objects contained within a segmented buffer.
A thin templated base class for arrays of fixed length objects.
An abstract, device-independent, interface to bitmapped graphics contexts.
IMPORT_C void Reserved_CGraphicsContext_2()
A reserved virtual function for future use.
virtual void Clear()=0
Clears the whole bitmap.
virtual IMPORT_C void Reserved_CBitmapContext_3()
virtual TInt AlphaBlendBitmaps(const TPoint &aDestPt, const CFbsBitmap *aSrcBmp, const TRect &aSrcRect, const CFbsBitmap *aAlphaBmp, const TPoint &aAlphaPt)=0
Performs an alpha blending of the source data, aSrcBmp, with the CBitmapContext, using the data from ...
virtual void SetFadingParameters(TUint8 aBlackMap, TUint8 aWhiteMap)=0
Sets the fading parameters.
virtual IMPORT_C void Reserved_CBitmapContext_2()
virtual void BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask)=0
Performs a masked bitmap block transfer.
IMPORT_C TInt APIExtension(TUid aUid, TAny *&aOutput, TAny *aInput)
virtual void SetFaded(TBool aFaded)=0
Sets whether the graphics context is faded.
virtual IMPORT_C void Reserved_CBitmapContext_1()
virtual void BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap)=0
Performs a bitmap block transfer.
virtual void CopyRect(const TPoint &aOffset, const TRect &aRect)=0
Copies a rectangle.
Defines an abstract interface for the capabilities and attributes of a bitmapped graphics device.
virtual void GetPixel(TRgb &aColor, const TPoint &aPixel) const =0
Gets the RGB colour of an individual pixel on a bitmapped graphics device.
virtual void RemoveFile(TInt aId=0)=0
Removes a font file from the font store.
virtual TInt GetNearestFontToMaxHeightInPixels(CFont *&, const TFontSpec &, TInt)
virtual TInt GetNearestFontInPixels(CFont *&aFont, const TFontSpec &aFontSpec)=0
TInt CreateBitmapContext(CBitmapContext *&aGC)
Creates a bitmap context for this bitmap device.
virtual TInt FontHeightInPixels(TInt aTypefaceIndex, TInt aHeightIndex) const =0
Gets the height, in pixels, of the specified typeface at one of its defined heights.
virtual void GetScanLine(TDes8 &aBuf, const TPoint &aStartPixel, TInt aLength, TDisplayMode aDispMode) const =0
Copies a scanline into a buffer.
virtual TInt GetNearestFontToDesignHeightInPixels(CFont *&, const TFontSpec &)
virtual TInt AddFile(const TDesC &aName, TInt &aId)=0
Adds a font file to the device's typeface store.
IMPORT_C ~CFontCache()
Destructor.
TInt iNumMisses
The number of cache misses since the font cache was created i.e.
IMPORT_C CFont * AddEntryL(CFont *aFont, const TFontSpec &aFontSpec)
Adds a font entry to the cache.
IMPORT_C CFont * RemoveFirstEntry()
Removes the first entry from the font cache and returns it.
TInt iNumHits
The number of cache hits since the font cache was created i.e.
IMPORT_C CFontCache()
Default constructor.
IMPORT_C CFont * Search(const TFontSpec &aFontSpec)
Searches the cache for a specified font.
TUint16 iDirection
The direction in which to draw the text.
TInt iWordJustExcess
The amount of space to be used for word spacing.
TInt iCharJustExcess
The amount of space to be used for letter spacing.
TInt iMaxAdvance
The maximum advance.
TUint16 iFlags
Flags from TFlags.
TInt iEndInputChar
Index specifying the final input character.
TInt iStartInputChar
Starting index specifying first input character in iText.
TInt iMaxBounds
The maximum width (or height if drawing vertically) of bounds.
TInt iWordJustNum
The number of spaces to be used for word spacing.
TFlags
Flags for TMeasureTextInput::iFlags.
@ EFVisualOrder
Input text is visually ordered left-to-right.
@ EFIncludePenPositionInBoundsCheck
Flag to consider side bearings when checking bounds for line-break.
@ EFVisualOrderRightToLeft
Input text is visually ordered right-to-left.
TInt iCharJustNum
The number of glyph groups to be letter-spaced.
TInt iChars
The number of input characters that would be drawn.
TSize iMaxGlyphSize
The maximum width and height of any glyph.
TInt iGroups
The number of groups that would be drawn.
TInt iSpaces
The number of word spaces (U+0020) that would be drawn.
TInt iGlyphs
The number of glyphs that would be drawn.
TRect iBounds
The bounding box of all the glyphs that would be drawn.
const TUint8 * iBitmap
Bitmap data for the glyph, if available.
TOutput()
Standard constructor.
TRect iBounds
Bitmap bounds relative to the original pen position.
TUint iCode
Character or glyph code.
TSize iBitmapSize
Size of the bitmap before algorithmic bolding, size multiplication, etc.
Complicated parameter block used for contextual glyph selection, ligature creation and diacritic plac...
TOutput iOutput[EMaxOutputGlyphs]
Information about the glyphs that were output.
TUint16 iFlags
Input: Flags from TFlags.
TInt16 iDirection
Input: Orientation (EHorizontal or EVertical) in which to draw the text.
TFlags
Flags for TPositionParam::iFlags.
@ EFLogicalOrder
Input text is logically ordered not visually ordered.
TPositionParam()
Standard constructor.
TInt iPosInText
Input and output: Position within iText to shape.
TPtrC iText
Input: Text containing the characters to be positioned.
TPoint iPen
Input and output: Pen position.
TInt iOutputGlyphs
Number of glyphs actually output.
TInt FontCapitalAscent() const
Gets the ascent of an ANSI capital letter in the font whether or not there are any ANSI capitals in t...
IMPORT_C TInt ExtendedFunction(TUid aFunctionId, TAny *aParam=NULL) const
Enables the caller to access a particular API extension function.
virtual IMPORT_C TBool DoGetCharacterPosition(TPositionParam &aParam) const
Overridable function innards of GetCharacterPosition and GetCharacterPosition2.
TInt FontLineGap() const
Gets the suggested line gap for the font.
TCharacterDataAvailability
@ ENoCharacterData
No font information available.
@ ECharacterWidthOnly
Width information only is available.
@ EAllCharacterData
All character data is available.
IMPORT_C TUid TypeUid() const
Gets run-time identity of the actual font type.
IMPORT_C TFontSpec FontSpecInTwips() const
Gets the font specification of this font in twips.
static IMPORT_C TBool CharactersJoin(TInt aLeftCharacter, TInt aRightCharacter)
Determines if aLeftCharacter and aRightCharacter affect each other's contextual glyph form if placed ...
IMPORT_C TInt HeightInPixels() const
Gets the font height in pixels.
IMPORT_C TInt MeasureText(const TDesC &aText, const TMeasureTextInput *aInput=NULL, TMeasureTextOutput *aOutput=NULL) const
Text measurement function.
IMPORT_C TInt TextWidthInPixels(const TDesC &aText) const
Gets the width in pixels of the specified descriptor when displayed in this font.
IMPORT_C TInt AscentInPixels() const
Gets the font ascent in pixels.
virtual IMPORT_C ~CFont()
Default destructor.
IMPORT_C TInt MaxNormalCharWidthInPixels() const
Gets the width in pixels of the widest normal character in this font.
TTextDirection
Text direction flags.
@ EHorizontal
Text is drawn horizontally.
@ EVertical
Text is drawn vertically.
TInt FontMaxAscent() const
Gets the max ascent of any pre-composed glyph in the font.
virtual IMPORT_C TCharacterDataAvailability DoGetCharacterData(TUint aCode, TOpenFontCharMetrics &aMetrics, const TUint8 *&aBitmap, TSize &aBitmapSize) const
Gets the character metrics for a character.
IMPORT_C TInt TextCount(const TDesC &aText, TInt aWidthInPixels) const
Gets how much of the specified descriptor can be displayed in this font without exceeding the specifi...
IMPORT_C TBool GetCharacterPosition2(TPositionParam &aParam, RShapeInfo &aShapeInfo) const
Takes Unicode text and produces the glyph cluster for the first character in that text plus any combi...
IMPORT_C TCharacterDataAvailability GetCharacterData(TUint aCode, TOpenFontCharMetrics &aMetrics, const TUint8 *&aBitmap, TSize &aBitmapSize) const
Gets the character metrics for a character.
IMPORT_C TInt CharWidthInPixels(TChar aChar) const
Gets the width in pixels in this font of the specified character.
TInt FontMaxDescent() const
Gets the max descent of any pre-composed glyph in the font.
TInt FontStandardDescent() const
Gets the descent of an ANSI descending character in the font.
IMPORT_C TInt DescentInPixels() const
Gets the font descent in pixels.
IMPORT_C TBool GetCharacterPosition(TPositionParam &aParam) const
Transforms one cluster of characters (base character plus combining marks, ligature or indic syllable...
virtual IMPORT_C TInt DoExtendedFunction(TUid aFunctionId, TAny *aParam=NULL) const
API extension system that enables the caller to access a particular API extension function.
IMPORT_C TInt MaxCharWidthInPixels() const
Gets the width in pixels of the widest character in this font.
IMPORT_C TInt WidthZeroInPixels() const
Gets the width of the zero character of this font in pixels.
IMPORT_C TInt BaselineOffsetInPixels() const
Gets the baseline offset in pixels.
TInt FontMaxHeight() const
Gets the (positive) maximum height in pixels of the font.
Parameters used in drawing text within supplied context.
Abstract base class for all graphics contexts.
virtual void SetPenStyle(TPenStyle aPenStyle)=0
Sets the line drawing style for the pen.
virtual void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle)=0
Sets the strikethrough style.
virtual IMPORT_C void Reserved_CGraphicsContext_2()
A reserved virtual function for future use.
virtual void DrawArc(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd)=0
Draws an arc.
@ EDrawModeOR
Bitwise ORs the pen and brush colours with the screen colour.
@ EDrawModeNOTPEN
Inverts the pen and brush colours.
@ EDrawModeANDNOT
Inverts the screen colour before ANDing.
@ EDrawModeNOTXOR
Inverts the pen and brush colours before XORing.
@ EDrawModeNOTAND
Inverts the pen and brush colours before ANDing.
@ EDrawModeNOTSCREEN
Inverts the colour of each pixel that is drawn over, (pen and brush attributes are ignored).
@ EDrawModeORNOT
Inverts the pen and brush colours before ORing.
@ EDrawModeNOTORNOT
Inverts the screen and pen and brush colours before ORing.
@ EDrawModeWriteAlpha
Writes alpha information in the source directly into the destination, rather than blending.
@ EDrawModeNOTOR
Inverts the screen colour before ORing.
@ EDrawModePEN
Uses both pen and brush colour as they are.
@ EDrawModeAND
Bitwise ANDs the pen and brush colours with the screen colour.
@ EDrawModeXOR
Bitwise XORs the pen and brush colours with the screen colour.
@ EDrawModeNOTANDNOT
Inverts the screen and pen and brush colours before ANDing.
virtual void Plot(const TPoint &aPoint)=0
Draws a single point.
virtual void MoveBy(const TPoint &aVector)=0
Sets the drawing point relative to the current co-ordinates.
virtual void Reset()=0
Resets the graphics context to its default settings:
IMPORT_C TInt GetUnderlineMetrics(TInt &aTop, TInt &aBottom)
IMPORT_C TInt GetShadowColor(TRgb &aShadowColor)
Get the font's shadow colour.
virtual void DrawEllipse(const TRect &aRect)=0
Draws and fills an ellipse.
virtual void SetBrushColor(const TRgb &aColor)=0
Sets the brush colour.
IMPORT_C TInt SetShadowColor(const TRgb &aShadowColor)
Set the font's shadow colour.
@ ESolidBrush
The brush fills with a solid single colour, determined by SetBrushColor() and the drawing mode.
@ ERearwardDiagonalHatchBrush
The brush fills with rearward diagonal hatching lines going from top left to bottom right.
@ EDiamondCrossHatchBrush
The brush fills with forward diagonal and rearward diagonal hatching lines going from bottom left to ...
@ EHorizontalHatchBrush
The brush fills with horizontal hatching lines going from left to right.
@ ENullBrush
The brush fill has no effect (default).
@ EForwardDiagonalHatchBrush
The brush fills with diagonal hatching lines going from bottom left to top right.
@ ESquareCrossHatchBrush
The brush fills with horizontal and vertical hatching lines going from left to right plus lines going...
@ EVerticalHatchBrush
The brush fills with vertical hatching lines going from top to bottom.
@ EPatternedBrush
The brush fills with a selected bitmap pattern, set by UseBrushPattern().
virtual TInt SetClippingRegion(const TRegion &aRegion)=0
Sets the clipping region, any items that fall outside the extent of the clipping region will not be d...
virtual void MapColors(const TRect &aRect, const TRgb *aColors, TInt aNumPairs, TBool aMapForwards)=0
Maps pixels in the specified rectangle.
static IMPORT_C TInt JustificationInPixels(TInt aExcessPixels, TInt aTotalUnits, TInt aFirstUnit, TInt aNumUnits)
Gets the amount of space in pixels by which to adjust letter or word spacing, given the total number ...
virtual void UseFont(const CFont *aFont)=0
Sets the device font to be used for text drawing.
virtual void DrawLineBy(const TPoint &aVector)=0
Draws a straight line relative to the current drawing point, using a vector.
virtual TInt DrawPolygon(const CArrayFix< TPoint > *aPointList, TFillRule aFillRule=EAlternate)=0
Draws and fills a polygon defined using an array of points.
virtual CGraphicsDevice * Device() const =0
Gets a pointer to the graphics context's graphics device.
virtual void DrawText(const TDesC &aText, const TPoint &aPosition)=0
Draws text without a surrounding box.
virtual void MoveTo(const TPoint &aPoint)=0
Sets the drawing point relative to the co-ordinate origin.
virtual void DrawTextVertical(const TDesC &aText, const TPoint &aPos, TBool aUp)=0
Draws vertical text in the specified direction.
virtual void SetUnderlineStyle(TFontUnderline aUnderlineStyle)=0
Sets the underline style.
virtual void DrawPie(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd)=0
Draws and fills a pie slice.
virtual void DrawPolyLine(const CArrayFix< TPoint > *aPointList)=0
Draws a polyline from a set of points in an array.
virtual void SetWordJustification(TInt aExcessWidth, TInt aNumGaps)=0
Adjusts the spaces between words to stretch or squeeze to a certain width.
virtual void SetClippingRect(const TRect &aRect)=0
Sets the clipping rectangle.
@ EWinding
Fill areas with winding numbers greater than zero.
@ EAlternate
Only fill areas with odd winding numbers.
virtual void SetCharJustification(TInt aExcessWidth, TInt aNumChars)=0
Sets character justification.
virtual void SetPenSize(const TSize &aSize)=0
Sets the line drawing size for the pen.
virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aSource)=0
Draws a bitmap at the specified point.
virtual void SetBrushStyle(TBrushStyle aBrushStyle)=0
Sets the brush style.
virtual void DiscardBrushPattern()=0
Discards a non-built-in brush pattern.
virtual void SetPenColor(const TRgb &aColor)=0
Sets the pen colour.
TTextAlign
Text alignment.
@ ERight
Text is right-aligned.
@ ELeft
Text is left-aligned.
@ ECenter
Text is centred.
@ EDotDashPen
A line of alternating dashes and dots.
@ EDashedPen
A dashed line.
@ EDottedPen
A dotted line.
@ EDotDotDashPen
A line of alternating single dashes and pairs of dots.
@ ESolidPen
A solid line (default).
@ ENullPen
The pen does not draw.
virtual void DrawRoundRect(const TRect &aRect, const TSize &aCornerSize)=0
Draws and fills a rectangle with rounded corners.
virtual void DrawLineTo(const TPoint &aPoint)=0
Draws a straight line from the current drawing point to a specified point.
virtual void DrawLine(const TPoint &aPoint1, const TPoint &aPoint2)=0
Draws a straight line between two points.
virtual void SetOrigin(const TPoint &aPos=TPoint(0, 0))=0
Sets the position of the co-ordinate origin.
virtual void DrawRect(const TRect &aRect)=0
Draws and fills a rectangle.
virtual void UseBrushPattern(const CFbsBitmap *aBitmap)=0
Sets the brush pattern to the specified bitmap.
virtual void CancelClippingRegion()=0
Cancels the current clipping region.
virtual void SetBrushOrigin(const TPoint &aOrigin)=0
Sets the brush pattern origin.
virtual void DrawBitmapMasked(const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask)=0
Draws a specified rectangle of a source bitmap to fit into a given rectangle using a given mask.
virtual IMPORT_C void Reserved()
Reserved function for future use.
IMPORT_C TInt DrawTextExtended(const TDesC &aText, const TPoint &aPosition, const TDrawTextExtendedParam &aParam)
Draws text, optionally changing its direction (right-to-left / left-to-right).
virtual void CancelClippingRect()=0
Cancels any clipping rectangle.
virtual void DiscardFont()=0
Discards a font.
IMPORT_C TBool IsFbsBitGc() const
Determine if the Gc is a CFbsBitGc.
virtual void SetDrawMode(TDrawMode aDrawingMode)=0
Sets the drawing mode.
virtual IMPORT_C TInt APIExtension(TUid aUid, TAny *&aOutput, TAny *aInput)
Specifies the interface for concrete device classes.
virtual TDisplayMode DisplayMode() const =0
Gets the display mode of the device.
virtual TSize SizeInTwips() const =0
Gets the size of the device area in twips.
virtual void SetPalette(CPalette *aPalette)=0
Sets the device's palette.
virtual TInt GetPalette(CPalette *&aPalette) const =0
Gets the device's current palette.
virtual void TypefaceSupport(TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const =0
Gets typeface information for a specified typeface.
virtual TInt CreateContext(CGraphicsContext *&aGC)=0
Creates a graphics context for the device.
virtual TSize SizeInPixels() const =0
Gets the size of the device area in pixels.
virtual TInt FontHeightInTwips(TInt aTypefaceIndex, TInt aHeightIndex) const =0
Get the height of a font in twips.
virtual TInt NumTypefaces() const =0
Gets the number of typefaces supported by the graphics device.
virtual void PaletteAttributes(TBool &aModifiable, TInt &aNumEntries) const =0
Gets the palette attributes of the device.
Provides user-definable palette support to the GDI.
IMPORT_C TRgb NearestEntry(const TRgb &aColor) const
Gets the colour in the palette which is closest to the specified colour.
TInt Entries() const
Gets the number of entries in the palette.
IMPORT_C void Clear()
Clears all the entries in the palette to TRgb(0).
IMPORT_C ~CPalette()
Destructor.
static IMPORT_C CPalette * NewDefaultL(TDisplayMode aDispMode)
Creates a new default palette for the specified display mode.
void ConstructL(TInt aNumberOfEntries)
IMPORT_C TInt NearestIndex(const TRgb &aColor) const
Gets the index of the colour in the palette which is closest to the specified colour.
IMPORT_C void GetDataPtr(TInt aFirstColor, TInt aNumColors, TPtr8 &aPtr)
Returns a descriptor over the palette entries for the specifed colors.
IMPORT_C void SetEntry(TInt aPaletteIndex, const TRgb &aPaletteEntry)
Sets the palette entry at aPaletteIndex to the RGB value aPaletteEntry.
static IMPORT_C CPalette * NewL(TInt aNumberOfEntries)
Creates a new palette with the specified number of entries.
IMPORT_C TRgb GetEntry(TInt aPaletteIndex) const
Gets the RGB value of the palette entry at aPaletteIndex.
Implements a printer model list interface for a collection of PDR files.
IMPORT_C TInt ModelCount() const
Gets the number of printer models in the printer model list.
IMPORT_C const TPrinterModelEntry operator[](TInt anIndex)
Gets printer model name.
virtual IMPORT_C ~CPdrModelList()
Virtual destructor.
IMPORT_C TInt UidToNum(TUid aModelUid) const
Gets a printer models index within the model list from its UID.
IMPORT_C void AddDirectoryL(const TDesC &aDir)
Adds a directory to the list of directories to be scanned for printer models.
IMPORT_C CPrinterModelList * ScanForModelsL()
Scans through through the list of directories for all .pdr files and generates a list of printer mode...
IMPORT_C CPrinterDriver * CreatePrinterDriverL(TInt anIndex)
Creates an object for accessing the specified store that contains printer specification data.
static IMPORT_C CPdrModelList * NewL()
Constructs, and returns a pointer to a new instance of the printer model list interface.
Abstract base class for: drawing a picture to a graphics context, storing and restoring the picture.
virtual IMPORT_C ~CPicture()
Frees all resources owned by the object prior to its destruction.
virtual void Draw(CGraphicsContext &aGc, const TPoint &aTopLeft, const TRect &aClipRect, MGraphicsDeviceMap *aMap) const =0
Draws a picture.
virtual void DetachFromStoreL(TDetach=EDetachFull)
virtual IMPORT_C void GetCropInTwips(TMargins &aMargins) const
Gets the cropping margins of a picture in twips.
IMPORT_C void AddCropInPixels(MGraphicsDeviceMap *aMap, const TMargins &aMargins)
Adds pixel cropping margins to the picture.
virtual IMPORT_C TInt ScaleFactorWidth() const
Gets the picture's width scale factor.
virtual IMPORT_C TPictureCapability Capability() const
Gets the picture's capabilities.
virtual void ExternalizeL(RWriteStream &aStream) const =0
Externalises the picture to a stream.
virtual IMPORT_C TBool LineBreakPossible(TUint aClass, TBool aBeforePicture, TBool aHaveSpaces) const
States whether a line break is possible, either before or after a picture.
IMPORT_C void SetSizeInTwips(const TSize &aSize)
Sets the picture's size, in twips.
IMPORT_C void GetSizeInTwips(TSize &aSize) const
Gets the picture's size, in twips.
IMPORT_C void GetSizeInPixels(MGraphicsDeviceMap *aMap, TSize &aSize) const
Gets the picture's size in pixels.
virtual IMPORT_C TBool NativePixelSize(TSize &aPixelSize)
Derived classes might be implemented as bitmaps, in that case it might be interesting to now the nati...
virtual IMPORT_C void SetCropInTwips(const TMargins &aMargins)
Sets the cropping margins of a picture in twips.
TDetach
Options for detaching pictures from stores.
@ EDetachFull
Internalise all data that is required to fully store the picture later; null any references to contai...
@ EDetachDraw
Internalise enough information to draw the picture (and no more); null any references to containing s...
IMPORT_C void SetSizeInPixels(MGraphicsDeviceMap *aMap, const TSize &aSize)
Sets the picture's size in pixels.
virtual IMPORT_C TInt ScaleFactorHeight() const
Gets the pictures height scale factor.
virtual void GetOriginalSizeInTwips(TSize &aSize) const =0
Gets the pictur's original size, in twips.
IMPORT_C void ResetToOriginal()
Resets the picture's scaling and cropping attributes to their original values.
virtual IMPORT_C void SetScaleFactor(TInt aScaleFactorWidth, TInt aScaleFactorHeight)
Sets the picture's scale factors.
virtual IMPORT_C TStreamId StoreL(CStreamStore &aStore) const
Stores the picture to the specified store.
Printer control interface.
virtual void QueueEndPrint(TRequestStatus &aStatus)=0
Terminates the print process.
CPrinterPort * iPrinterPort
Printer port.
virtual void AbortPrint()=0
Aborts the print process before it has completed.
TMoreOnPage
Flags indicating whether there is more on the page to print.
@ ENoMoreOnPage
Indicates there is no more to print on the current page.
@ EMoreOnPage
Indicates there is more to print on the current page.
IMPORT_C ~CPrinterControl()
Destructor.
@ ENotPrinting
Not printing.
TState iState
Printing state.
virtual TMoreOnPage QueueGetBand(TRequestStatus &aStatus, TBandAttributes &aBand)=0
Prints the next band on the page.
virtual TInt BandsPerPage()=0
Gets the number of bands per page.
Printer graphics device interface.
IMPORT_C void RestorePropertiesL()
Restores printer properties.
virtual TInt SetModel(const TPrinterModelHeader &aModel, CStreamStore &aStore)=0
Sets the printer model header and the store.
virtual IMPORT_C void SelectPageSpecInTwips(const TPageSpec &aPageSpec)
Sets the page specification in twips.
virtual TPrinterModelEntry Model() const =0
Gets the printer model entry.
virtual void ExternalizePropertiesL(RWriteStream &) const
Externalizes printer properties to the store.
IMPORT_C void StorePropertiesL() const
Stores the printer properties.
virtual IMPORT_C TRect PrintablePageInPixels() const
Gets the dimensions of the area to which the printer device can print.
TPageSpec iCurrentPageSpecInTwips
Current page specification in twips.
virtual void InternalizePropertiesL(RReadStream &)
Externalizes printer properties to the store.
CPrinterControl * iControl
The printer control.
TPageSpec CurrentPageSpecInTwips() const
Gets the current page specification in twips.
IMPORT_C CPrinterDevice()
Standard constructor.
virtual void CreateControlL(CPrinterPort *aPrinterPort)=0
Creates a printer control.
virtual IMPORT_C void DeleteControl()
Deletes the printer control owned by this object.
IMPORT_C ~CPrinterDevice()
Destructor.
Printer specific user interface.
virtual IMPORT_C void AfterPrintL()
Provides an opportunity for a dialog to be put up after printing is complete.
IMPORT_C CPrinterDriverUI()
virtual IMPORT_C TBool CanSetProperties()
Tests whether printer properties can be set.
virtual TInt SetPrinterDevice(CPrinterDevice *aPrinterDevice)=0
Sets the printer device.
virtual IMPORT_C TBool BeforePrintL()
Provides an opportunity for a dialog to be put up before printing begins.
virtual IMPORT_C void SetPropertiesL()
Provides an opportunity for a dialog to be put up to capture or change printer properties.
Provides access to a store containing printer specification data.
IMPORT_C TInt NumModels() const
Gets the number of printer models defined by the printer specification.
static IMPORT_C CPrinterDriver * NewL()
Constructs, and returns a pointer to a new instance for accessing a printer specification data store.
IMPORT_C ~CPrinterDriver()
Destructor.
IMPORT_C void Close()
Closes the printer specification data store and frees resources.
IMPORT_C TPrinterModelEntry Model(TInt aNum) const
Gets the specified printer model.
IMPORT_C void OpenPdrL(const TDesC &aName)
Opens the specified printer specification data store.
CPrinterDevice * PrinterDevice()
Gets the associated graphics printer device.
IMPORT_C CPrinterDevice * CreatePrinterDeviceL(TUid aModelUid)
Creates the physical graphics device to be used for printing.
IMPORT_C CPrinterDriverUI * CreatePrinterDriverUIL()
Constructs a printer specific user interface.
Printer model list interface.
virtual TInt ModelCount() const =0
Gets the number of printer models in the printer model list.
virtual const TPrinterModelEntry operator[](TInt anIndex)=0
Gets printer model name.
virtual TInt UidToNum(TUid aModelUid) const =0
Gets a printer models index within the model list from its UID.
virtual void Cancel()=0
Cancels an outstanding WriteRequest() operation.
virtual void WriteRequest(const TDesC8 &aBuf, TRequestStatus &aRequestStatus)=0
Writes data asynchronously to the printer port.
Typeface store abstract base interface.
virtual TInt GetNearestFontInTwips(CFont *&aFont, const TFontSpec &aFontSpec)=0
IMPORT_C void ConstructL()
Second phase constructor.
static IMPORT_C TInt SuperSubHeight(TInt aHeight, TFontPrintPosition aPos)
Gets the height for a font in subscript or superscript form.
CArrayFixFlat< TFontAccess > * iFontAccess
A list of fonts accessed by clients of the typeface store, which pairs a font with a count of the num...
virtual TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec)=0
virtual TInt GetNearestFontToMaxHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight)=0
IMPORT_C void ReleaseFont(CFont *aFont)
Releases the hold of a typeface store client on a specified font.
IMPORT_C void AddFontL(CFont *aFont)
Adds a hold, by a client of the typeface store, on the specified font.
virtual void TypefaceSupport(TTypefaceSupport &aTypefaceSupport, TInt aTypefaceIndex) const =0
Gets typeface information for a specified typeface index.
static IMPORT_C TInt BaselineOffset(TInt aHeight, TFontPrintPosition aPos)
Gets the baseline offset, in twips, for any font in subscript or superscript form.
IMPORT_C TBool IncrementFontCount(const CFont *aFont)
Search for the font in iFontAccess and increment its count.
virtual TInt NumTypefaces() const =0
Gets the number of typefaces supported by the typeface store.
virtual TInt FontHeightInTwips(TInt aTypefaceIndex, TInt aHeightIndex) const =0
Gets the height of the font with specified height and typeface indices, in twips.
IMPORT_C CTypefaceStore()
IMPORT_C ~CTypefaceStore()
Destroys the typeface store and reclaims the memory allocated to it.
Interface class for mapping between twips and device-specific units (pixels).
virtual IMPORT_C ~MGraphicsDeviceMap()
Destructor.
virtual TInt HorizontalPixelsToTwips(TInt aPixels) const =0
Converts a horizontal dimension from pixels to twips.
virtual TInt GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)
virtual TInt GetNearestFontInTwips(CFont *&aFont, const TFontSpec &aFontSpec)=0
virtual void ReleaseFont(CFont *aFont)=0
Releases the specified font.
virtual TInt VerticalPixelsToTwips(TInt aPixels) const =0
Converts a vertical dimension from pixels to twips.
virtual TInt HorizontalTwipsToPixels(TInt aTwips) const =0
Converts a horizontal dimension from twips to pixels.
virtual TInt GetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt)
IMPORT_C TPoint PixelsToTwips(const TPoint &aPixelPoint) const
Converts a point in pixels to a point in twips.
IMPORT_C MGraphicsDeviceMap()
Default constructor.
IMPORT_C TPoint TwipsToPixels(const TPoint &aTwipPoint) const
Converts a point in twips to a point in pixels.
virtual TInt VerticalTwipsToPixels(TInt aTwips) const =0
Converts a vertical dimension from twips to pixels.
Abstract interface for instantiating and restoring new CPicture derived objects.
virtual void NewPictureL(TPictureHeader &aHeader, const CStreamStore &aDeferredPictureStore) const =0
Interface to the picture restoration process that ensures that a picture of the correct type is resto...
A handle to a file server session.
A handle to a dynamically loadable DLL.
Controls the attributes of the band to be printed.
TRect iRect
The width and height of the band in twips or pixels.
TBool iFirstBandOnPage
ETrue if band is the first band on the page; EFalse if not.
TBool iTextIsIgnored
ETrue to draw no text to the band; EFalse to draw text.
TBool iGraphicsIsIgnored
ETrue to draw no graphics to the band; EFalse to draw graphics.
A build-independent non-modifiable buffer descriptor.
A build-independent modifiable buffer descriptor.
Holds a character value and provides a number of utility functions to manipulate it and test its prop...
Code section range information.
TInt iStart
The beginning of the range.
TInt iEnd
The end of the range.
Enables conversion, in both directions, between a TRgb object and an index into an arbitrary 256 colo...
TUint8 iInverseColorTable[0x1000]
Inverse colour lookup table.
static IMPORT_C const TColor256Util * Default()
Returns a pointer to the system default 256 colour palette.
TUint32 iColorTable[256]
256 colour lookup table.
IMPORT_C TInt Color256(TRgb aRgb) const
Gets the entry from the inverse colour lookup table for the colour that most closely matches the spec...
IMPORT_C void Construct(const CPalette &aPalette)
Initialises the two lookup tables using the specified palette.
A set of static utility functions to get information about a display mode.
static IMPORT_C TBool IsDisplayModeColor(TDisplayMode aDispMode)
Tests whether the display mode specified is colour or greyscale.
static IMPORT_C TInt NumDisplayModeBitsPerPixel(TDisplayMode aDispMode)
Gets the number of bits required by each pixel when displayed in the specified display mode.
static IMPORT_C TInt NumDisplayModeColors(TDisplayMode aDispMode)
Gets the number of colours or shades of grey supported by the specified display mode.
static IMPORT_C TBool IsDisplayModeValid(TDisplayMode aDispMode)
Tests whether the display mode specified is one of the valid values.
Specifies the font specification in device independent terms.
TFontStyle iFontStyle
The font style of the typeface.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises the font specification to a write stream.
IMPORT_C TBool operator==(const TFontSpec &aFontSpec) const
Compares this font specification with another.
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a font specification from a read stream.
IMPORT_C TInt ScriptTypeForMetrics() const
Returns the script with which font metrics calculation will be based on.
IMPORT_C TFontSpec()
Default constructor.
TInt iHeight
The height of the typeface (in twips).
IMPORT_C void SetScriptTypeForMetrics(TLanguage aLanguage)
Specifies the script with which font metrics calculation will be based on.
TTypeface iTypeface
The typeface.
Encapsulates a font style.
IMPORT_C void SetStrokeWeight(TFontStrokeWeight aStrokeWeight)
Sets the stroke weight attribute.
IMPORT_C void SetEffects(TUint32 aEffects)
Sets the font effects flags.
IMPORT_C TBool IsEffectOn(FontEffect::TEffect aEffect) const
Checks if a font effect is on.
IMPORT_C TBool operator==(const TFontStyle &aFontStyle) const
Compares a font style for equality.
TGlyphBitmapType BitmapType() const
Gets the anti-aliasing setting for the font, as set by SetBitmapType().
IMPORT_C TFontPrintPosition PrintPosition() const
Gets the print position attribute.
IMPORT_C TFontStrokeWeight StrokeWeight() const
Gets the stroke weight attribute.
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a font style from a read stream.
IMPORT_C void SetPrintPosition(TFontPrintPosition aPrintPosition)
Sets the print position attribute.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises the font style to a write stream.
IMPORT_C TFontPosture Posture() const
Gets the posture attribute.
IMPORT_C TUint32 Effects() const
Gets the font effects flags.
IMPORT_C void SetPosture(TFontPosture aPosture)
Sets the posture attribute.
IMPORT_C TFontStyle()
Default C++ constructor.
void SetBitmapType(TGlyphBitmapType aBitmapType)
Sets whether the font should be drawn using anti-aliasing.
Linear digital differential analyser.
IMPORT_C void JumpToYCoord2(TInt &aXCoord, TInt aYCoord)
Jumps to a y co-ordinate.
IMPORT_C TBool SingleStep(TPoint &aPosition)
Gets the pixel co-ordinates of the next pixel on the pixel line.
IMPORT_C TBool NextStep(TPoint &aPosition)
Gets the pixel co-ordinates of the start of the next scan line.
IMPORT_C TBool SingleScanline(TPoint &aStartPosition, TPoint &aEndPosition)
Gets the start and end pixel co-ordinates that define the next scan line.
IMPORT_C void Construct(const TPoint &aStart, const TPoint &aFinish, TLineMode aMode=ECenter)
Constructs a linear DDA, setting the start and end points of the line.
@ ELeft
Starts at the beginning of a complete scan line.
@ ECenter
Centres scan-lines in the pixel line.
IMPORT_C void JumpToYCoord(TInt &aXCoord, const TInt aYCoord)
Jumps to a y co-ordinate.
IMPORT_C TLinearDDA()
Constructs the default linear DDA.
IMPORT_C void JumpToRect(const TRect &aRect)
Jumps to start of a clipping rectangle.
IMPORT_C void JumpToXCoord(const TInt aXCoord, TInt &aYCoord)
Jumps to x co-ordinate.
IMPORT_C void JumpToXCoord2(TInt aXCoord, TInt &aYCoord)
Jumps to x co-ordinate.
A set of margins used for cropping a picture.
IMPORT_C TBool operator!=(const TMargins &aMargins) const
Tests margins for inequality.
TInt iRight
Right margin, (in twips or pixels).
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a set of margins from a read stream.
IMPORT_C TBool operator==(const TMargins &aMargins) const
Tests margins for equality.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises a set of margins to a write stream.
TInt iTop
Top margin, (in twips or pixels).
TInt iLeft
Left margin, (in twips or pixels).
TInt iBottom
Bottom margin, (in twips or pixels).
Page specification for a print operation.
TPageOrientation
The available page orientations.
@ EPortrait
Portrait page orientation.
@ ELandscape
Landscape page orientation.
IMPORT_C TSize OrientedPageSize() const
Gets the oriented page size.
IMPORT_C TBool operator!=(const TPageSpec &aPageSpec) const
Inequality operator.
TSize iPortraitPageSize
The width and height of the page in portrait orientation in twips or pixels.
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a page specification object from a read stream.
IMPORT_C TBool operator==(const TPageSpec &aPageSpec) const
Equality operator.
IMPORT_C TPageSpec()
Default constructor.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises the page specification object to a write stream.
TPageOrientation iOrientation
The page orientation.
TBool iIsCroppable
Scaling type.
TScalingType
Scaling types.
@ ENotScaleable
The picture is not scalable.
@ EFullyScaleable
The picture is fully scalable.
@ EScaleableMaintainingAspectRatio
The picture is scalable to any size, as long as its aspect ratio (the ratio of its height to its widt...
TScalingType iScalingType
Whether or not the picture is croppable.
Stores a two-dimensional point in Cartesian co-ordinates.
Detailed information about a printer model.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises the printer model entry to a write stream.
TPrinterModelName iModelName
The name of the printer model.
TUid iUid
The UID associated with this printer model.
TBool iRequiresPrinterPort
If ETrue, then a printer port is required.
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a printer model entry from a read stream.
Clipping region - abstract base class.
Indicates the completion status of a request made to a service provider.
24-bit RGB colour value with 8 bits each for red, green and blue.
TRgb operator|(const TRgb &aColor)
Bitwise logical OR operator.
TInt _Gray4() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C void SetBlue(TInt aBlue)
Sets the blue component.
TUint32 Internal() const
Gets the 32-bit value of the TRgb as an integer.
TInt _Gray2() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TInt _Color16M() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C TUint _Color16MAP() const
Converts the TRgb to EColor16MAP (with color channels pre-multiplied with the alpha channel.
TInt _Gray256() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C void SetAlpha(TInt aAlpha)
Sets the alpha component.
IMPORT_C TInt Gray16() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TRgb operator&(const TRgb &aColor)
Bitwise logical AND operator.
IMPORT_C TInt Color16() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C TInt Color4K() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TRgb & operator|=(const TRgb &aColor)
Logical OR assignment operator.
TInt Red() const
Gets the red component.
IMPORT_C TInt Difference(const TRgb &aColor) const
Gets the difference between two TRgbs.
IMPORT_C TInt Gray2() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TUint _Color16MA() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TRgb operator~() const
Bitwise logical inversion operator.
TInt Green() const
Gets the green component.
TRgb & operator^=(const TRgb &aColor)
Logical EXCLUSIVE OR assignment operator.
TRgb()
Constructs a TRgb initialised to KRgbWhite.
IMPORT_C void SetRed(TInt aRed)
Sets the red component.
IMPORT_C TUint Color16MAP() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TInt _Color64K() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TRgb & operator&=(const TRgb &aColor)
Logical AND assignment operator.
TUint32 Value() const
Gets the 32-bit value of the TRgb as an integer.
IMPORT_C TInt Gray4() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C TInt Color16M() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C TUint Color16MA() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C TInt Color64K() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a TRgb object from a stream.
IMPORT_C TInt Color256() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TInt Alpha() const
Gets the alpha component.
TRgb operator^(const TRgb &aColor)
Bitwise EXCLUSIVE OR operator.
IMPORT_C TInt Gray256() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
void SetInternal(TUint32 aInternal)
Sets the 32-bit value of the TRgb as a 32-bit integer.
TInt _Gray16() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises a TRgb object to a stream.
TBool operator!=(const TRgb &aColor) const
Compares this colour with the specified colour for inequality.
IMPORT_C TInt Color16MU() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
TBool operator==(const TRgb &aColor) const
Compares this colour with the specified colour for equality.
TInt _Color16MU() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
IMPORT_C void SetGreen(TInt aGreen)
Sets the green component.
TInt Blue() const
Gets the blue component.
TInt _Color4K() const
Gets the index of the closest TRgb value to this, based on the matching display mode.
Stores a two-dimensional size as a width and a height value.
Typeface family support information.
TTypeface iTypeface
The name and attributes of the typeface.
TInt iMaxHeightInTwips
The typeface's maximum font height, in twips.
TBool iIsScalable
Whether the typeface is scaleable.
TInt iNumHeights
The number of distinct font heights available in the typeface.
TInt iMinHeightInTwips
The typeface's minimum font height, in twips.
Typeface name and attributes.
IMPORT_C TInt Attributes() const
Gets the combination of attributes of the typeface.
IMPORT_C void SetAttributes(TInt aAttributes)
Set the combination of attributes for this typeface.
IMPORT_C TInt ScriptTypeForMetrics() const
Gets the script with which font metrics calculation will be based on.
@ ESerif
Typeface is a serif typeface (e.g.
@ ESymbol
Typeface is a symbol typeface (e.g.
@ EProportional
Typeface is a proportional typeface (e.g.
TBufC< KMaxTypefaceNameLength > iName
The typeface name.
IMPORT_C void ExternalizeL(RWriteStream &aStream) const
Externalises a typeface to a write stream.
IMPORT_C void SetIsSerif(TBool aIsSerif)
Sets the typeface's serif attribute.
IMPORT_C const TDesC & Name() const
Returns the name of the typeface.
IMPORT_C TBool operator==(const TTypeface &aTypeface) const
Compares two typefaces for equality.
IMPORT_C TBool IsProportional() const
Gets the typeface's proportional attribute.
IMPORT_C void SetScriptTypeForMetrics(TLanguage aLanguage)
Specifies the script with which font metrics calculation will be based on.
IMPORT_C void SetName(const TDesC &aName)
IMPORT_C void SetIsProportional(TBool aIsProportional)
Sets the typeface's proportional attribute.
IMPORT_C void InternalizeL(RReadStream &aStream)
Internalises a typeface from a read stream.
IMPORT_C TBool IsSymbol() const
Gets the typeface's symbol attribute.
IMPORT_C TTypeface()
Default C++ constructor.
IMPORT_C TBool IsSerif() const
Gets the typeface's serif attribute.
IMPORT_C void SetIsSymbol(TBool aIsSymbol)
Sets the typeface's symbol attribute.
A globally unique 32-bit number.
The interface for mapping between twips and device-specific units enriched with facilities to allow z...
IMPORT_C TInt VerticalTwipsToPixels(TInt aTwipHeight) const
Converts a vertical dimension from twips to pixels.
IMPORT_C TInt GetNearestFontToMaxHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec, TInt aMaxHeight)
void SetGraphicsDeviceMap(const MGraphicsDeviceMap *aDevice)
Sets the graphics device map for this zoom factor object.
IMPORT_C void ReleaseFont(CFont *aFont)
Releases the specified font.
IMPORT_C TInt ZoomFactor() const
Gets the zoom factor.
IMPORT_C TInt HorizontalTwipsToPixels(TInt aTwipWidth) const
Converts a horizontal dimension from twips to pixels.
IMPORT_C void SetZoomFactor(TInt aZoomFactor)
Sets the zoom factor.
IMPORT_C ~TZoomFactor()
Destructor.
IMPORT_C void SetTwipToPixelMapping(const TSize &aSizeInPixels, const TSize &aSizeInTwips)
Sets the twips to pixels mapping for the graphics device with which the zoom factor is associated.
IMPORT_C TInt HorizontalPixelsToTwips(TInt aPixelWidth) const
Converts a horizontal dimension from pixels to twips.
const MGraphicsDeviceMap * GraphicsDeviceMap() const
Gets the graphics device map of this zoom factor object.
IMPORT_C TZoomFactor()
Constructs a default zoom factor object.
IMPORT_C TInt GetNearestFontToDesignHeightInTwips(CFont *&aFont, const TFontSpec &aFontSpec)
IMPORT_C TInt GetNearestFontInTwips(CFont *&aFont, const TFontSpec &aFontSpec)
IMPORT_C TInt VerticalPixelsToTwips(TInt aPixelHeight) const
Converts a vertical dimension from pixels to twips.
HBufC8 HBufC
Defines a build-independent heap descriptor.
TPtrC8 TPtrC
Defines a build-independent non-modifiable pointer descriptor.
TDesC8 TDesC
Defines a build-independent non-modifiable descriptor.
const TSize KC5PaperSizeInTwips(9184, 12983)
const TUid KFontGetFontTable
TBuf< KMaxPrinterModelNameLength > TPrinterModelName
Defines a modifiable buffer descriptor that can contain the name of a printer model.
TFontStrikethrough
Font strike-through flags.
@ EStrikethroughOn
Font is struck-through.
@ EStrikethroughOff
Font is not struck-through.
const TUid KFontReleaseGlyphOutline
TGlyphBitmapType
An enumerated type for the format of a glyph bitmap.
@ ESubPixelGlyphBitmap
The format used when sub-pixel font rendering is used.
@ EDefaultGlyphBitmap
The font store's default glyph bitmap format is used.
@ EFourColourBlendGlyphBitmap
The format used when outline and shadow font rendering is used.
@ EAntiAliasedOrMonochromeGlyphBitmap
This is used to inform the rasterizer that the best match should be found for the bitmap type based u...
@ EMonochromeGlyphBitmap
The standard monochrome format: no anti-aliasing, 1 bit per pixel, run-length encoded.
@ EAntiAliasedGlyphBitmap
Standard 8-bits-per-pixel with anti-aliasing.
@ EGlyphBitmapTypeNotDefined
This is used for glyphs, and not fonts, and is needed to inform the font drawing routines that the ch...
const TSize KDLPaperSizeInTwips(6236, 12472)
const TUid KFontMaxAscent
const TInt KTwipsPerInch
Number of twips per inch.
const TInt KSubscriptOffsetPercentage
The percentage of a font height used to calculate its baseline offset for a subscript print position.
TFontStrokeWeight
Font stroke weight flags.
@ EStrokeWeightNormal
Font stroke weight is normal.
@ EStrokeWeightBold
Font stroke weight is bold.
const TInt KSuperSubScalingPercentage
The percentage used to multiply a normal font height when calculating its superscript or subscript he...
const TInt KMaxFontCacheEntries
The maximum number of entries in the font cache.
TFontPosture
Font posture flags.
@ EPostureUpright
Font posture is normal (upright).
@ EPostureItalic
Font posture is italic.
TGdiPanic
This enumeration holds the possible panic codes that may be raised by the GDI API on detecting an unr...
@ EGdiPanic_Unknown
Not used.
@ EGdiPanic_Unused1
Unused panic codes.
@ EGdiPanic_TypefaceNameOverflow
Setting a typeface name that is too long.
@ EGdiPanic_InvalidInputParam
One or more of the input parameters to the interface were invalid.
@ EGdiPanic_Invariant
Internal failure.
@ EGdiPanic_OutOfText
Insufficient text for successful completion of the method.
const TUid KFontStandardDescent
const TUid KFontGetGlyphOutline
const TUid KFontCapitalAscent
WARNING: this Class is for internal use ONLY.
const TSize KLegalPaperSizeInTwips(12240, 20160)
TFontPrintPosition
Font print position flags.
@ EPrintPosNormal
Font is normal.
@ EPrintPosSuperscript
Font is superscript.
@ EPrintPosSubscript
Font is subscript.
const TSize KMonarchPaperSizeInTwips(5580, 10800)
const TSize KA4PaperSizeInTwips(11906, 16838)
const TUid KFontReleaseFontTable
const TUid KFontMaxDescent
const TInt KSuperscriptOffsetPercentage
The percentage of a font height used to calculate its baseline offset for a superscript print positio...
const TInt KPointsPerInch
Number of points per inch.
const TSize KLetterPaperSizeInTwips(12240, 15840)
const TInt KTwipsPerPoint
Number of twips per point.
const TInt KTwipsPerCm
Number of twips per cm.
const TInt KMaxTypefaceNameLength
The maximum length of a typeface name (in characters).
NONSHARABLE_CLASS(FontEffect)
Defines a set of font effects flags.
const TInt KMaxPrinterModelNameLength
The maximum length of a printer model name.
const TSize KExecutivePaperSizeInTwips(10440, 15120)
const TSize KCom_10PaperSizeInTwips(5940, 13680)
TFontUnderline
Font underline flags.
@ EUnderlineOff
Font is not underlined.
@ EUnderlineOn
Font is underlined.
const TInt KPdrStoreFileUidVal
The UID value of a printer specification data store.
Parameters for extended text drawing and measuring.
TDrawTextExtendedParam()
Constructor.
TBool iParRightToLeft
ETrue if the text direction is right-to-left (for scripts like Arabic and Hebrew).
Parameters to control the drawing of text.
TInt iCharJustExcess
amount of space to be used for letterspacing
TDrawTextParam()
Reserved for future use.
TInt iWordJustExcess
amount of space to be used for wordspacing
CFont::TTextDirection iDirection
the direction in which to draw the text.
TInt iWordJustNum
number of spaces to be used for wordspacing
TInt iCharJustNum
number of glyph groups to be letterspaced