CPrintPreviewDevice Class Reference
class CPrintPreviewDevice : public CGraphicsDevice
|
Public Member Functions
|
|
~CPrintPreviewDevice
()
|
TInt
|
CreateContext
(
CGraphicsContext
*&)
|
TDisplayMode
|
DisplayMode
()
|
TInt
|
FontHeightInTwips
(
TInt
,
TInt
)
|
TInt
|
GetNearestFontInPixels
(
CFont
*&, const
TFontSpec
&)
|
TInt
|
GetNearestFontInTwips
(
CFont
*&, const
TFontSpec
&)
|
TInt
|
GetNearestFontToDesignHeightInPixels
(
CFont
*&, const
TFontSpec
&)
|
TInt
|
GetNearestFontToDesignHeightInTwips
(
CFont
*&, const
TFontSpec
&)
|
TInt
|
GetNearestFontToMaxHeightInPixels
(
CFont
*&, const
TFontSpec
&,
TInt
)
|
TInt
|
GetNearestFontToMaxHeightInTwips
(
CFont
*&, const
TFontSpec
&,
TInt
)
|
TInt
|
GetPalette
(
CPalette
*&)
|
TInt
|
HorizontalPixelsToTwips
(
TInt
)
|
TInt
|
HorizontalTwipsToPixels
(
TInt
)
|
CPrintPreviewDevice
*
|
NewL
(
CWsScreenDevice
*)
|
TInt
|
NumTypefaces
()
|
void
|
PaletteAttributes
(
TBool
&,
TInt
&)
|
void
|
ReleaseFont
(
CFont
*)
|
void
|
SetBandRect
(const
TRect
&)
|
void
|
SetPalette
(
CPalette
*)
|
void
|
SetPanelPos
(const
TPoint
&)
|
void
|
SetTwipToPixelMapping
(const
TSize
&, const
TSize
&)
|
void
|
SetWindow
(
RWindow
*)
|
TSize
|
SizeInPixels
()
|
TSize
|
SizeInTwips
()
|
void
|
TypefaceSupport
(
TTypefaceSupport
&,
TInt
)
|
TInt
|
VerticalPixelsToTwips
(
TInt
)
|
TInt
|
VerticalTwipsToPixels
(
TInt
)
|
Constructor & Destructor Documentation
CPrintPreviewDevice(CWsScreenDevice *)
Member Functions Documentation
CreateContext(CGraphicsContext *&)
Creates a graphics context for the device.
Parameters
CGraphicsContext
*& aGC
|
On return, contains a pointer to the created graphics context.
|
DisplayMode()
TDisplayMode
|
DisplayMode
|
(
|
)
|
const [virtual]
|
Gets the display mode of the device.
DoCreateContextL(CGraphicsContext *&)
FontHeightInTwips(TInt, TInt)
TInt
|
FontHeightInTwips
|
(
|
TInt
|
aTypefaceIndex,
|
|
TInt
|
aHeightIndex
|
|
)
|
const [virtual]
|
Get the height of a font in twips.
The font is identified by typeface and height.
The value returned is rounded up or down to the nearest font height in twips.
Parameters
TInt
aTypefaceIndex
|
An index identifying the typeface, in the range: 0 to (NumTypefaces() - 1).
|
TInt
aHeightIndex
|
An index identifying the font height, in the range: 0 to (iNumHeights - 1). Note that iNumHeights is in the TTypefaceSupport object returned by TypefaceSupport().
|
GetNearestFontInPixels(CFont *&, const TFontSpec &)
GetNearestFontInTwips(CFont *&, const TFontSpec &)
GetNearestFontToDesignHeightInPixels(CFont *&, const TFontSpec &)
GetNearestFontToDesignHeightInTwips(CFont *&, const TFontSpec &)
TInt
|
GetNearestFontToDesignHeightInTwips
|
(
|
CFont
*&
|
aFont,
|
|
const
TFontSpec
&
|
aFontSpec
|
|
)
|
[virtual]
|
GetNearestFontToMaxHeightInPixels(CFont *&, const TFontSpec &, TInt)
GetNearestFontToMaxHeightInTwips(CFont *&, const TFontSpec &, TInt)
TInt
|
GetNearestFontToMaxHeightInTwips
|
(
|
CFont
*&
|
aFont,
|
|
const
TFontSpec
&
|
aFontSpec,
|
|
TInt
|
aMaxHeight
|
|
)
|
[virtual]
|
GetPalette(CPalette *&)
Gets the device's current palette.
This function is only supported if the device has a modifiable palette, which can be determined by calling
PaletteAttributes()
.
Parameters
CPalette
*& aPalette
|
On return, holds the device's current palette.
|
HorizontalPixelsToTwips(TInt)
TInt
|
HorizontalPixelsToTwips
|
(
|
TInt
|
aPixels
|
)
|
const [virtual]
|
HorizontalTwipsToPixels(TInt)
TInt
|
HorizontalTwipsToPixels
|
(
|
TInt
|
aTwips
|
)
|
const [virtual]
|
NumTypefaces()
TInt
|
NumTypefaces
|
(
|
)
|
const [virtual]
|
Gets the number of typefaces supported by the graphics device.
PaletteAttributes(TBool &, TInt &)
void
|
PaletteAttributes
|
(
|
TBool
&
|
aModifiable,
|
|
TInt
&
|
aNumEntries
|
|
)
|
const [virtual]
|
Gets the palette attributes of the device.
Parameters
TBool
& aModifiable
|
On return, holds information on whether or not the device's palette is modifiable (ETrue) or fixed (EFalse).
|
TInt
& aNumEntries
|
On return, holds the number of entries in the device's palette.
|
ReleaseFont(CFont *)
void
|
ReleaseFont
|
(
|
CFont
*
|
aFont
|
)
|
[virtual]
|
SetBandRect(const TRect &)
void
|
SetBandRect
|
(
|
const
TRect
&
|
aRect
|
)
|
[inline]
|
SetPalette(CPalette *)
void
|
SetPalette
|
(
|
CPalette
*
|
aPalette
|
)
|
[virtual]
|
Sets the device's palette.
Setting the palette is only possible if the device has a modifiable palette, which can be determined by calling
PaletteAttributes()
.
Parameters
CPalette
* aPalette
|
The new palette for the device.
|
SetPanelPos(const TPoint &)
void
|
SetPanelPos
|
(
|
const
TPoint
&
|
aPoint
|
)
|
[inline]
|
SetTwipToPixelMapping(const TSize &, const TSize &)
void
|
SetTwipToPixelMapping
|
(
|
const
TSize
&
|
aImageSizeInPixels,
|
|
const
TSize
&
|
aPageSizeInTwips
|
|
)
|
|
Parameters
const
TSize
& aImageSizeInPixels
|
|
const
TSize
& aPageSizeInTwips
|
|
SetWindow(RWindow *)
void
|
SetWindow
|
(
|
RWindow
*
|
aWin
|
)
|
[inline]
|
SizeInPixels()
TSize
|
SizeInPixels
|
(
|
)
|
const [virtual]
|
Gets the size of the device area in pixels.
SizeInTwips()
TSize
|
SizeInTwips
|
(
|
)
|
const [virtual]
|
Gets the size of the device area in twips.
TypefaceSupport(TTypefaceSupport &, TInt)
Gets typeface information for a specified typeface.
This information is returned in aTypefaceSupport, and includes:
the typeface name and typeface attributes
the number of font heights
the maximum and minimum font heights
whether it is a scalable typeface
NumTypefaces()
Parameters
TTypefaceSupport
& aTypefaceSupport
|
On return, contains the typeface information.
|
TInt
aTypefaceIndex
|
A typeface index number, in the range: zero to (NumTypefaces() - 1).
|
VerticalPixelsToTwips(TInt)
TInt
|
VerticalPixelsToTwips
|
(
|
TInt
|
aPixels
|
)
|
const [virtual]
|
VerticalTwipsToPixels(TInt)
TInt
|
VerticalTwipsToPixels
|
(
|
TInt
|
aTwips
|
)
|
const [virtual]
|
Member Data Documentation
TRect
iBandRect
TRect
|
iBandRect
|
[private]
|
TSize
iPageSizeInTwips
TSize
|
iPageSizeInTwips
|
[private]
|
CWsScreenDevice * iWinDevice
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.