Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: BITDEV.H
Link against: bitgdi.lib

Class CFbsScreenDevice

class CFbsScreenDevice : public CFbsDevice;

Description

A graphics device interface that provides direct access to the screen, without the mediation of the window server.

The interface adds sprite support to the CFbsDevice base class.

Derivation

Members

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

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CBitmapDevice:
CreateBitmapContext()

Inherited from CFbsDevice:
AddFile(), CreateContext(), DisplayMode(), DisplayMode16M(), DrawingBegin(), DrawingEnd(), FontHeightInPixels(), FontHeightInTwips(), GetDrawRect(), GetFontById(), GetNearestFontInPixels(), GetNearestFontInTwips(), GetNearestFontToDesignHeightInPixels(), GetNearestFontToDesignHeightInTwips(), GetNearestFontToMaxHeightInPixels(), GetNearestFontToMaxHeightInTwips(), GraphicsAccelerator(), NumTypefaces(), Orientation(), RectCompare(), ReleaseFont(), RemoveFile(), SetBits(), SetCustomPalette(), SetScalingFactor(), SizeInPixels(), TypefaceSupport(), iBitBltMaskedBuffer, iDrawDevice, iFbs, iGraphicsAccelerator, iOrientation, iScreenDevice, iSpare, iTypefaceStore

Inherited from MGraphicsDeviceMap:
PixelsToTwips(), TwipsToPixels()


Construction and destruction


NewL()

static IMPORT_C CFbsScreenDevice *NewL(const TDesC &aLibname, TDisplayMode aDispMode);

Description

Creates a new CFbsScreenDevice object.

Parameters

const TDesC &aLibname

Not used.

TDisplayMode aDispMode

The display mode of the device.

Return value

CFbsScreenDevice *

The newly created FBSERV screen device.


NewL()

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

Description

Creates a new CFbsScreenDevice object.

Parameters

const TDesC &aLibname

Not used.

TDisplayMode aDispMode

The display mode of the device.

TRgb aWhite

Not used.

Return value

CFbsScreenDevice *

The newly created font and bitmap server screen device.


NewL()

static IMPORT_C CFbsScreenDevice *NewL(TInt aScreenNo, TDisplayMode aDispMode);

Description

Creates a new CFbsScreenDevice object.

Parameters

TInt aScreenNo

The screen number. If the device has a support for only one screen, its number is 0.

TDisplayMode aDispMode

The display mode of the device.

Return value

CFbsScreenDevice *

The newly created FBSERV screen device.


~CFbsScreenDevice()

virtual IMPORT_C ~CFbsScreenDevice();

Description

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

[Top]


Member functions


GetScanLine()

virtual IMPORT_C 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().

Parameters

TDes8 &aBuf

const TPoint &aStartPixel

TInt aLength

TDisplayMode aDispMode


GetPixel()

virtual IMPORT_C 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().

Parameters

TRgb &aColor

const TPoint &aPixel


HorizontalPixelsToTwips()

virtual IMPORT_C TInt HorizontalPixelsToTwips(TInt aPixels) const;

Description

Converts a horizontal dimension from pixels to twips.

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

Parameters

TInt aPixels

Return value

TInt


VerticalPixelsToTwips()

virtual IMPORT_C TInt VerticalPixelsToTwips(TInt aPixels) const;

Description

Converts a vertical dimension from pixels to twips.

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

Parameters

TInt aPixels

Return value

TInt


HorizontalTwipsToPixels()

virtual IMPORT_C TInt HorizontalTwipsToPixels(TInt aTwips) const;

Description

Converts a horizontal dimension from twips to pixels.

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

Parameters

TInt aTwips

Return value

TInt


VerticalTwipsToPixels()

virtual IMPORT_C TInt VerticalTwipsToPixels(TInt aTwips) const;

Description

Converts a vertical dimension from twips to pixels.

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

Parameters

TInt aTwips

Return value

TInt


SetAutoUpdate()

IMPORT_C void SetAutoUpdate(TBool aValue);

Description

Sets or unsets auto-update for the screen.

Parameters

TBool aValue

ETrue, if the screen is set to auto-update; EFalse, otherwise.


DrawSpriteBegin()

IMPORT_C void DrawSpriteBegin();

Description

Starts drawing the sprite.


DrawSpriteEnd()

IMPORT_C void DrawSpriteEnd();

Description

Ends drawing the sprite.


CancelSprite()

virtual IMPORT_C void CancelSprite() const;

Description

Cancels drawing the sprite.


HideSprite()

virtual IMPORT_C TSpriteBase *HideSprite() const;

Description

Hides the sprite over the whole screen.

Return value

TSpriteBase *

A pointer to the hidden sprite.


HideSprite()

virtual IMPORT_C 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()

virtual IMPORT_C 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()

virtual IMPORT_C 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


ChangeScreenDevice()

IMPORT_C void ChangeScreenDevice(CFbsScreenDevice *aOldDevice);

Description

Changes the screen device.

Parameters

CFbsScreenDevice *aOldDevice

A pointer to the old screen device.


PaletteAttributes()

virtual IMPORT_C 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 palette is modifiable (ETrue) or fixed (EFalse).

TInt &aNumEntries

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


SetPalette()

virtual IMPORT_C void SetPalette(CPalette *aPalette);

Description

Sets the device palette to the specified palette.

Parameters

CPalette *aPalette

The new palette for the device.


GetPalette()

virtual IMPORT_C TInt GetPalette(CPalette *&aPalette) const;

Description

Gets the devices current palette.

Parameters

CPalette *&aPalette

On return, holds the devices current palette.

Return value

TInt

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


Update()

IMPORT_C void Update();

Description

Forces any out of date region of the screen to update.


Update()

IMPORT_C void Update(const TRegion &aRegion);

Description

Forces any out of date region of the screen to update, and additionally forces the specified region to update.

Parameters

const TRegion &aRegion

The region of the screen to update, in addition to any out of date region.


SizeInTwips()

virtual IMPORT_C TSize SizeInTwips() const;

Description

Gets the size of the device area, in twips.

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

Return value

TSize

See also:


HardwareBitmap()

IMPORT_C RHardwareBitmap HardwareBitmap();

Description

Creates and returns a hardware bitmap (a bitmap which can be drawn to by a graphics accelerator whose operations may be implemented in hardware or software), whose handle is to the screen.

This allows the caller to draw to the screen like any other hardware bitmap.

This function may not be supported on all hardware. If unsupported, it returns an RHardwareBitmap with a handle of zero.

The hardware bitmap can be used to draw directly to the screen. Use it to create a TAcceleratedBitmapSpec object, which can either be used to get a TAcceleratedBitmapInfo, or can be passed to a graphics operation (an instance of a class derived from class TGraphicsOperation) e.g. a bitblt to copy one part of the screen to another.

Direct screen access must only be carried out in combination with the Window Server's direct screen access classes; i.e. only use the hardware bitmap on the CFbsScreenDevice which you get from CDirectScreenAccess, and not from your own CFbsScreenDevice.

Return value

RHardwareBitmap

A hardware bitmap whose handle is to the screen.

See also:


ScreenNo()

IMPORT_C TInt ScreenNo() const;

Description

Query the screen number to which the object refers.

Return value

TInt

Screen number as passed in aScreenNo to NewL.