CSoftwareGraphicsAccelerator Class Reference

#include <graphicsaccelerator.h>

class CSoftwareGraphicsAccelerator : public CGraphicsAccelerator

Inherits from

Detailed Description

A factory for creating 2D graphics accelerator objects whose graphics operations are implemented in software.

Objects of derived classes can write to all types of bitmap, not just hardware bitmaps. Note that graphics accelerators may support only a subset of all graphics operations.

Member Function Documentation

Capabilities ( )

const TGraphicsAcceleratorCaps *Capabilities()[pure virtual]

Reimplemented from CGraphicsAccelerator::Capabilities()

Returns the capabilities of the graphics accelerator.

Returns: The capabilities of the accelerator.

GenericCapabilities ( )

IMPORT_C const TGraphicsAcceleratorCaps *GenericCapabilities()[static]

Gets the generic capabilities of the accelerator, including which display modes are supported for the bitmap passed to NewL().

Generic capabilities apply to all software graphics accelerators on the device. The function is static, so it can be used to find out the capabilities of graphics accelerators before deciding on whether or not to create one.

The CGraphicsAccelerator::Capabilities() function provides information about the capabilities of a particular graphics accelerator.

As capabilities may vary depending on the display mode of a bitmap, this method should indicate as supported any features which are only available in some display modes.

Returns: Generic capabilities for software graphics accelerators.

NewL ( CFbsBitmap * )

IMPORT_C CSoftwareGraphicsAccelerator *NewL(CFbsBitmap *aBitmap)[static]

Allocates and constructs an instance of a derived class and initialises its capabilities.

See also: TGraphicsAcceleratorCaps::iDisplayModes

leave
KErrNoMemory There is no memory to allocate the graphics accelerator KErrNotSupported There is no graphics accelerator supporting the display mode given by the bitmap parameter
ParameterDescription
aBitmapThe bitmap for the accelerator to draw to. This may be any type of bitmap, including a hardware bitmap.

Returns: Pointer to the initialised graphics accelerator object.

Operation ( const TGraphicsOperation & )

TInt Operation(const TGraphicsOperation &aOperation)[pure virtual]

Reimplemented from CGraphicsAccelerator::Operation(const TGraphicsOperation &)

Requests the graphics accelerator to perform a single graphics operation.

ParameterDescription
aOperationAn instance of a TGraphicsOperation-derived class that identifies the graphics operation to be performed.

Returns: KErrNone if successful, otherwise one of the system error codes. The function should return KErrNotSupported if the accelerator does not support the requested operation.

Operation ( const TGraphicsOperation &, TInt, TRect * )

TInt Operation(const TGraphicsOperation &aOperation,
TIntaNumClipRects,
TRect *aClipRects
)[pure virtual]

Reimplemented from CGraphicsAccelerator::Operation(const TGraphicsOperation &,TInt,TRect *)

Requests the graphics accelerator perform a single graphics operation within a clipping region. This version is of Operation() is only usable if the accelerator capabilities returned by Capabilities() indicate that clipping to a region is supported.

See also: TGraphicsAcceleratorCaps::iClipping

ParameterDescription
aOperationAn instance of a TGraphicsOperation-derived class that identifies the graphics operation to be performed.
aNumClipRectsThe number of rectangles in the clipping region.
aClipRectsA pointer to the first rectangle in the clipping region.

Returns: KErrNone if successful, otherwise one of the system error codes. The function should return KErrNotSupported if the accelerator does not support the requested operation.

Operation ( TDes8 & )

TInt Operation(TDes8 &aBuffer)[pure virtual]

Reimplemented from CGraphicsAccelerator::Operation(TDes8 &)

Requests the graphics accelerator perform one or more graphics operations contained in a buffer.

The underlying implementation may be able to process a group of graphics operations more efficiently than if Operation() was called for each individually.

This function should be implemented as if Operation() was called in turn for each operation contained in the buffer. Each operation should be carried out immediately after the one preceding it. If a method returns an error, the length of aBuffer should be set to indicate the number of operations that have been successfully processed. In this case, the operation in which the error occurred will be indicated by the memory address &aBuffer[aBuffer.Length()].

ParameterDescription
aBufferA descriptor which holds a concatenation of graphics operations (TGraphicsOperation-derived objects).

Returns: KErrNone if successful, otherwise one of the system error codes. The function should return KErrNotSupported if the accelerator does not support any of the requested operations.

Operation ( TDes8 &, TInt, TRect * )

TInt Operation(TDes8 &aBuffer,
TIntaNumClipRects,
TRect *aClipRects
)[pure virtual]

Reimplemented from CGraphicsAccelerator::Operation(TDes8 &,TInt,TRect *)

Requests the graphics accelerator perform one or more graphics operations within a clipping region. This version is of Operation() is only usable if the accelerator capabilities returned by Capabilities() indicate that clipping to a region is supported.

The underlying implementation may be able to process a group of graphics operations more efficiently than if Operation() was called for each individually.

This function should be implemented as if Operation() was called in turn for each operation contained in the buffer. Each operation should be carried out immediately after the one preceding it. If a method returns an error, the length of aBuffer should be set to indicate the number of operations that have been successfully processed. In this case, the operation in which the error occurred will be indicated by the memory address &aBuffer[aBuffer.Length()].

See also: TGraphicsAcceleratorCaps::iClipping

ParameterDescription
aBufferA descriptor which holds a concatenation of graphics operations (TGraphicsOperation objects).
aNumClipRectsThe number of rectangles in the clipping region.
aClipRectsA pointer to the first rectangle in the clipping region.

Returns: KErrNone if successful, otherwise one of the system error codes. The function should return KErrNotSupported if the accelerator does not support any of the requested operations.

Reserved_1 ( )

voidReserved_1()[pure virtual]

Reimplemented from CGraphicsAccelerator::Reserved_1()

Reserved_2 ( )

voidReserved_2()[pure virtual]

Reserved_3 ( )

voidReserved_3()[pure virtual]

Reserved_4 ( )

voidReserved_4()[pure virtual]