Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: bitdev.h
Link against: bitgdi.lib

Class CFbsScreenDevice

CFbsScreenDevice

Support

Supported from 5.0

Description

A Font Bitmap Server (FBSERV) device that also provides sprite support.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CBitmapDeviceDefines an interface for the capabilities and attributes of a bitmapped graphics device
CFbsDeviceAbstract base class for graphics devices to which bitmaps and fonts can be drawn
CFbsScreenDeviceA Font Bitmap Server (FBSERV) device that also provides sprite support
CGraphicsDeviceSpecifies the interface for concrete device classes
MGraphicsDeviceMapInterface class for mapping between twips and device-specific units (pixels)

Defined in CFbsScreenDevice:
CancelSprite(), ChangeScreenDevice(), DrawSpriteBegin(), DrawSpriteEnd(), GetPalette(), GetPixel(), GetScanLine(), HideSprite(), HorizontalPixelsToTwips(), HorizontalTwipsToPixels(), NewL(), PaletteAttributes(), SetAutoUpdate(), SetPalette(), ShowSprite(), SizeInTwips(), Update(), VerticalPixelsToTwips(), VerticalTwipsToPixels(), ~CFbsScreenDevice()

Inherited from CBase:
operator new()

Inherited from CBitmapDevice:
CreateBitmapContext()

Inherited from CFbsDevice:
AddFile(), CreateContext(), DisplayMode(), FontHeightInPixels(), FontHeightInTwips(), GetFontById(), GetNearestFontInPixels(), GetNearestFontInTwips(), NumTypefaces(), RectCompare(), ReleaseFont(), RemoveFile(), SetCustomPalette(), SizeInPixels(), TypefaceSupport()

Inherited from MGraphicsDeviceMap:
PixelsToTwips(), TwipsToPixels()


Construction and destruction


NewL()

static CFbsScreenDevice* NewL(const TDesC& aLibname,TDisplayMode aDispMode,TRgb aWhite=TRgb(255,255,255));

Description

Creates a new CFbsScreenDevice object.

Parameters

const TDesC& aLibname

Not used.

TDisplayMode aDispMode

The display mode of the device.

TRgb aWhite=KRgbWhite

Not used.

Return value

CFbsScreenDevice*

The newly created FBSERV screen device.


~CFbsScreenDevice()

virtual ~CFbsScreenDevice();

Description

Frees all resources owned by the object prior to its destruction.

[Top]


Updating the screen/region


SetAutoUpdate()

void SetAutoUpdate(TBool aValue);

Description

Sets or unsets auto-update for the screen.

Parameters

TBool aValue

True, if the screen is set to auto-update; false, otherwise.


Update()

void Update();

Description

Forces the whole screen to update.


Update()

void Update(const TRegion& aRegion);

Description

Forces the specified region to update.

Parameters

const TRegion& aRegion

The region of the screen to be updated.

[Top]


Sprites


DrawSpriteBegin()

void DrawSpriteBegin();

Description

Starts drawing the sprite.


DrawSpriteEnd()

void DrawSpriteEnd();

Description

Ends drawing the sprite.


CancelSprite()

void CancelSprite() const;

Description

Cancels drawing the sprite.


HideSprite()

TSpriteBase* HideSprite() const;

Description

Hides the sprite over the whole screen.

Return value

TSpriteBase*

A pointer to the hidden sprite.


HideSprite()

TSpriteBase* HideSprite(const TRect& aRect,const TRegion* aClippingRegion) const;

Description

Hides the sprite within a particular region.

Parameters

const TRect& aRect

A rectangle within the clipping region.

const TRegion* aClippingRegion

The clipping region.

Return value

TSpriteBase*

A pointer to the hidden sprite.


ShowSprite()

void ShowSprite(TSpriteBase* aSprite) const;

Description

Shows the specified sprite over the whole screen.

Parameters

TSpriteBase* aSprite

The sprite which is to be shown.


ShowSprite()

void ShowSprite(TSpriteBase* aSprite,const TRect& aRect,const TRegion* aClippingRegion) const;

Description

Shows the specified sprite within a particular region.

Parameters

TSpriteBase* aSprite

The sprite which is to be shown.

const TRect& aRect

A rectangle within the clipping region.

const TRegion* aClippingRegion

The clipping region

[Top]


Changing the screen device


ChangeScreenDevice()

void ChangeScreenDevice(CFbsScreenDevice* aOldDevice);

Description

Changes the screen device.

Parameters

CFbsScreenDevice* aOldDevice

A pointer to the old screen device.

[Top]


Getting pixels and scan lines


GetPixel()

void GetPixel(TRgb& aColor,const TPoint& aPixel) const;

Description

Gets the RGB colour of an individual pixel on a bitmapped graphics device.

This implements the pure virtual function CBitmapDevice::GetPixel().

See also:


GetScanLine()

void GetScanLine(TDes8& aBuf,const TPoint& aStartPixel,TInt aLength,TDisplayMode aDispMode) const;

Description

Copies a scanline into a buffer.

This implements the pure virtual function CBitmapDevice::GetScanLine().

See also:

[Top]


Device information


SizeInTwips()

TSize SizeInTwips() const;

Description

Gets the size of the device area, in twips.

This implements the pure virtual function CGraphicsDevice::SizeInTwips().

See also:

[Top]


Palette information


PaletteAttributes()

void PaletteAttributes(TBool& aModifiable,TInt& aNumEntries) const;

Description

Gets the palette attributes of the device.

Parameters

TBool& aModifiable

On return, holds information on whether or not the device’s palette is modifiable (true) or fixed (false).

TInt& aNumEntries

On return, holds the number of entries in the device’s palette.


SetPalette()

void SetPalette(CPalette* aPalette);

Description

Sets the device’s palette to the specified palette.

Parameters

CPalette* aPalette

The new palette for the device.


GetPalette()

TInt GetPalette(CPalette*& aPalette) const;

Description

Gets the device’s current palette.

Parameters

CPalette*& aPalette

On return, holds the device’s current palette.

Return value

TInt

KErrNone, if successful; otherwise, another of the system-wide error codes.

[Top]


Device twip/pixel conversions


HorizontalPixelsToTwips()

TInt HorizontalPixelsToTwips(TInt aPixels) const;

Description

Converts a horizontal dimension from pixels to twips.

This implements the pure virtual function MGraphicsDeviceMap::HorizontalPixelsToTwips().

See also:


HorizontalTwipsToPixels()

TInt HorizontalTwipsToPixels(TInt aTwips) const;

Description

Converts a horizontal dimension from twips to pixels.

This implements the pure virtual function MGraphicsDeviceMap::HorizontalTwipsToPixels().

See also:


VerticalPixelsToTwips()

TInt VerticalPixelsToTwips(TInt aPixels) const;

Description

Converts a vertical dimension from pixels to twips.

This implements the pure virtual function MGraphicsDeviceMap::VerticalPixelsToTwips().

See also:


VerticalTwipsToPixels()

TInt VerticalTwipsToPixels(TInt aTwips) const;

Description

Converts a vertical dimension from twips to pixels.

This implements the pure virtual function MGraphicsDeviceMap::VerticalTwipsToPixels().

See also: