CGifScaler::CBody Class Reference

class CGifScaler::CBody : public CActive

The private API for clients to call the GifScaler Library scaling and color quantization.

Body of CGifScaler

Inherits from

Private Member Functions
CBody(CFbsBitmap &, CFbsBitmap *, CGifScaler::TOptions)
~CBody()
voidCleanUp()
voidConstructL()
voidDoCancel()
CBody *NewL(CFbsBitmap &, CFbsBitmap *, CGifScaler::TOptions)
voidRequestComplete(TInt)
TInt RunError(TInt)
voidRunL()
voidScale(TRequestStatus *, CFbsBitmap &, CPalette &, TBool)
voidScale(TRequestStatus *, CFbsBitmap &, CPalette &, TUint8, TBool)
voidSelfComplete(TInt)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTScaleState {
EInactiveState, EScalingState, EStartColorQuantization, ECleanUpPending, ECleanUpState, EScalingComplete
}
Inherited Enumerations
CActive:TPriority
Private Attributes
CBitmapScaler *iBitmapScaler
CColorQuantizer *iColorQuantizer
TScaleState iCurrentState
CFbsBitmap *iDestination
CFbsBitmap *iDestinationMask
CFbsBitmap *iIntermediate
TBool iMaintainAspectRatio
CGifScaler::TOptions iOptions
CPalette *iPalette
TUint8 iReplacementIndex
TRequestStatus *iRequestStatus
CFbsBitmap &iSource
CFbsBitmap *iSourceMask
TUint8 iTransparencyIndex
TUint8 iTransparencyThreshold
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CBody(CFbsBitmap &, CFbsBitmap *, CGifScaler::TOptions)

CBody(CFbsBitmap &aSource,
CFbsBitmap *aSourceMask,
CGifScaler::TOptionsaOptions
)[private]

Parameters

CFbsBitmap & aSource
CFbsBitmap * aSourceMask
CGifScaler::TOptions aOptions

~CBody()

~CBody()[private]

Member Functions Documentation

CleanUp()

voidCleanUp()[private]

ConstructL()

voidConstructL()[private]

DoCancel()

voidDoCancel()[private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().

CActive::Cancel

NewL(CFbsBitmap &, CFbsBitmap *, CGifScaler::TOptions)

CBody *NewL(CFbsBitmap &aSource,
CFbsBitmap *aSourceMask,
CGifScaler::TOptionsaOptions
)[private, static]

Parameters

CFbsBitmap & aSource
CFbsBitmap * aSourceMask
CGifScaler::TOptions aOptions

RequestComplete(TInt)

voidRequestComplete(TIntaReason)[private]

Parameters

TInt aReason

RunError(TInt)

TInt RunError(TIntaError)[private, virtual]

Parameters

TInt aError

RunL()

voidRunL()[private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start

CActiveScheduler::Error

CActiveScheduler::WaitForAnyRequest

TRAPD

Scale(TRequestStatus *, CFbsBitmap &, CPalette &, TBool)

voidScale(TRequestStatus *aStatus,
CFbsBitmap &aDestination,
CPalette &aPalette,
TBoolaMaintainAspectRatio
)[private]

Parameters

TRequestStatus * aStatus
CFbsBitmap & aDestination
CPalette & aPalette
TBool aMaintainAspectRatio

Scale(TRequestStatus *, CFbsBitmap &, CPalette &, TUint8, TBool)

voidScale(TRequestStatus *aStatus,
CFbsBitmap &aDestination,
CPalette &aPalette,
TUint8aTransparencyThreshold,
TBoolaMaintainAspectRatio
)[private]

Parameters

TRequestStatus * aStatus
CFbsBitmap & aDestination
CPalette & aPalette
TUint8 aTransparencyThreshold
TBool aMaintainAspectRatio

SelfComplete(TInt)

voidSelfComplete(TIntaReason)[private]

Parameters

TInt aReason

Member Enumerations Documentation

Enum TScaleState

Enumerators

EInactiveState
EScalingState
EStartColorQuantization
ECleanUpPending
ECleanUpState
EScalingComplete

Member Data Documentation

CBitmapScaler * iBitmapScaler

CBitmapScaler *iBitmapScaler[private]

CColorQuantizer * iColorQuantizer

CColorQuantizer *iColorQuantizer[private]

TScaleState iCurrentState

TScaleState iCurrentState[private]

CFbsBitmap * iDestination

CFbsBitmap *iDestination[private]

CFbsBitmap * iDestinationMask

CFbsBitmap *iDestinationMask[private]

CFbsBitmap * iIntermediate

CFbsBitmap *iIntermediate[private]

TBool iMaintainAspectRatio

TBool iMaintainAspectRatio[private]

CGifScaler::TOptions iOptions

CGifScaler::TOptions iOptions[private]

CPalette * iPalette

CPalette *iPalette[private]

TUint8 iReplacementIndex

TUint8 iReplacementIndex[private]

TRequestStatus * iRequestStatus

TRequestStatus *iRequestStatus[private]

CFbsBitmap & iSource

CFbsBitmap &iSource[private]

CFbsBitmap * iSourceMask

CFbsBitmap *iSourceMask[private]

TUint8 iTransparencyIndex

TUint8 iTransparencyIndex[private]

TUint8 iTransparencyThreshold

TUint8 iTransparencyThreshold[private]