CAlfLineVisual Class Reference

class CAlfLineVisual : public CAlfVisual

Line visual draws a line along a curve path.

A line visual will draw a bendy line that follows a specified curve path. Width and alpha functions can be set to change the opacity and thickness of the line along its length.

Note that the Bitgdi renderer contains only a minimal implementation of line drawing. There is no aliasing or shading on the line, and thickness and alpha functions have no effect. The entire thickness of a Bitgdi line is set by the initial thickness at point 0. Usage:

 //Create curvepath, which can be used as a path for linevisual
 CAlfCurvePath* path = CAlfCurvePath::NewL( &iEnv );
 path->AppendArcL( TPoint(120, 120), TSize(60, 60), 180, 180 + 270, 0.5 );
 path->AppendLineL( TPoint(120, 180), TPoint(20, 180), 0.5 );
 
 //Create linevisual
 CAlfLineVisual* line = CAlfLineVisual::AddNewL( control );
 //set curvepath instance, with ownership transfered to visual
 line->SetPath( path, EAlfHasOwnership );
 
 //Line opacity function. Line visuals can use a mapping function to determine the opacity
 //of the line along the path. 
 //member variable : LinearMappingFunction linearFunc;
 linearFunc.SetFactor( 1 );
 //setlinevisual alpha function
 line->SetAlphaFunction( &linearFunc );
 
 //Similerly, line visuals can use a mapping function to determine the width of the
 //line along the path. 
 linearFunc.SetFactor( 60 );
 line->SetWidthFunction( &linearFunc ); * 
alfclient.lib
Since
S60 v3.2
CAlfCurvePath

Inherits from

Nested Classes and Structures

Public Member Functions
CAlfLineVisual()
~CAlfLineVisual()
IMPORT_C CAlfLineVisual *AddNewL(CAlfControl &, CAlfLayout *)
IMPORT_C voidConstructL(CAlfControl &)
IMPORT_C const TAlfTimedValue &EndPos()
IMPORT_C CAlfVisual *FindTag(const TDesC8 &)
IMPORT_C const TAlfImage &Image()
IMPORT_C CAlfCurvePath *Path()
IMPORT_C voidRemoveAndDestroyAllD()
IMPORT_C voidSetAlphaFunction(MAlfMappingFunction *)
IMPORT_C voidSetColor(const TRgb &)
IMPORT_C voidSetEndPos(const TAlfTimedValue &)
IMPORT_C voidSetImage(const TAlfImage &)
IMPORT_C voidSetPath(CAlfCurvePath *, TAlfOwnership)
IMPORT_C voidSetShadowThickness(const TAlfTimedValue &)
IMPORT_C voidSetStartPos(const TAlfTimedValue &)
IMPORT_C voidSetThickness(const TAlfTimedValue &)
IMPORT_C voidSetWidthFunction(MAlfMappingFunction *)
IMPORT_C const TAlfTimedValue &ShadowThickness()
IMPORT_C const TAlfTimedValue &StartPos()
IMPORT_C const TAlfTimedValue &Thickness()
IMPORT_C voidUpdateChildrenLayout(TInt)
Protected Member Functions
IMPORT_C voidDoRemoveAndDestroyAllD()
IMPORT_C voidPropertyOwnerExtension(const TUid &, TAny **)
Inherited Functions
CAlfPropertyOwner::CAlfPropertyOwner()
CAlfPropertyOwner::CopyProperty(const CAlfPropertyOwner &,const TDesC8 &)
CAlfPropertyOwner::PropertyClear()
CAlfPropertyOwner::PropertyFindInteger(const TDesC8 &,TInt *)const
CAlfPropertyOwner::PropertyFindString(const TDesC8 &,TDesC **)const
CAlfPropertyOwner::PropertyRemove(const TDesC8 &)
CAlfPropertyOwner::PropertySetIntegerL(const TDesC8 &,TInt,TInt,TInt)
CAlfPropertyOwner::PropertySetStringL(const TDesC8 &,const TDesC &)
CAlfPropertyOwner::~CAlfPropertyOwner()
CAlfVisual::AlignByOrigin(TAlfRealRect &)const
CAlfVisual::Brushes()
CAlfVisual::CAlfVisual()
CAlfVisual::ClearFlag(TAlfVisualFlags)
CAlfVisual::ClearFlags(TUint)
CAlfVisual::Clipping()const
CAlfVisual::Comms()const
CAlfVisual::ConstructL(CAlfControl &,TInt,TInt,const TDesC8 &)
CAlfVisual::CopyValues(const CAlfVisual &,TInt,TInt)
CAlfVisual::DepthOffset()const
CAlfVisual::Display()const
CAlfVisual::DisplayRect()const
CAlfVisual::DisplayRectTarget()const
CAlfVisual::DisplayToLocal(const TAlfRealPoint &)const
CAlfVisual::DisplayToLocal(const TPoint &)const
CAlfVisual::DropShadowHandler()const
CAlfVisual::EffectiveOpacity()const
CAlfVisual::EnableBrushesL(TBool)
CAlfVisual::EnableDropShadowL(TBool)
CAlfVisual::EnableTransformationL(TBool)
CAlfVisual::Env()const
CAlfVisual::Flags()const
CAlfVisual::HasTactileFeedback(TInt)const
CAlfVisual::HorizontalOrigin()const
CAlfVisual::HorizontalPadding()const
CAlfVisual::Identifier()const
CAlfVisual::IsTagged()const
CAlfVisual::Layout()const
CAlfVisual::LocalToDisplay(const TAlfRealPoint &)const
CAlfVisual::LocalToDisplay(const TPoint &)const
CAlfVisual::MaxSize()const
CAlfVisual::MaxSizeInBaseUnits()const
CAlfVisual::Mimic(CAlfVisual &,TInt)
CAlfVisual::MinSize()const
CAlfVisual::MinSizeInBaseUnits()const
CAlfVisual::Move(const TAlfRealPoint &,TInt)
CAlfVisual::Move(const TPoint &,TInt)
CAlfVisual::MoveToFront(TInt)
CAlfVisual::Opacity()const
CAlfVisual::Owner()const
CAlfVisual::Padding()const
CAlfVisual::PaddingAsMetric()const
CAlfVisual::PaddingInPixels()const
CAlfVisual::Pause(TInt)
CAlfVisual::Pos()const
CAlfVisual::RemoveTactileFeedback(TInt)
CAlfVisual::Resume(TInt)
CAlfVisual::SetCenteredPosAndSize(const TAlfRealPoint &,const TAlfRealSize &,TInt)
CAlfVisual::SetCenteredPosAndSize(const TPoint &,const TSize &,TInt)
CAlfVisual::SetClipping(TBool)
CAlfVisual::SetDepthOffset(const TAlfTimedValue &)
CAlfVisual::SetDisplay(CAlfDisplay *)
CAlfVisual::SetEffectL(const TDesC &)
CAlfVisual::SetFlag(TAlfVisualFlags)
CAlfVisual::SetFlags(TUint)
CAlfVisual::SetGroupEffectL(const TDesC &,TInt)
CAlfVisual::SetLayout(CAlfLayout *)
CAlfVisual::SetMaxSize(const TAlfRealSize &)
CAlfVisual::SetMaxSize(const TSize &)
CAlfVisual::SetMinSize(const TAlfRealSize &)
CAlfVisual::SetMinSize(const TSize &)
CAlfVisual::SetOpacity(const TAlfTimedValue &)
CAlfVisual::SetOrigin(TAlfVisualHOrigin,TAlfVisualVOrigin)
CAlfVisual::SetOwner(CAlfControl &)
CAlfVisual::SetPadding(TInt)
CAlfVisual::SetPadding(const TAlfBoxMetric &)
CAlfVisual::SetPadding(const TPoint &)
CAlfVisual::SetPos(const TAlfRealPoint &,TInt)
CAlfVisual::SetPos(const TAlfTimedPoint &)
CAlfVisual::SetRect(const TAlfRealRect &,TInt)
CAlfVisual::SetSize(const TAlfRealSize &,TInt)
CAlfVisual::SetSize(const TAlfTimedPoint &)
CAlfVisual::SetTactileFeedbackL(TInt,TInt)
CAlfVisual::SetTagL(const TDesC8 &)
CAlfVisual::Size()const
CAlfVisual::Tag()const
CAlfVisual::TagMatches(const TDesC8 &)const
CAlfVisual::Transformation()
CAlfVisual::VerticalOrigin()const
CAlfVisual::VerticalPadding()const
CAlfVisual::~CAlfVisual()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
Private Attributes
TLineVisualPrivateData *iLineVisualData

Constructor & Destructor Documentation

CAlfLineVisual()

IMPORT_CCAlfLineVisual()

Constructor.

~CAlfLineVisual()

IMPORT_C~CAlfLineVisual()[virtual]

Destructor.

Member Functions Documentation

AddNewL(CAlfControl &, CAlfLayout *)

IMPORT_C CAlfLineVisual *AddNewL(CAlfControl &aOwnerControl,
CAlfLayout *aParentLayout = 0
)[static]

Constructor, which gives ownership to the control.

Parameters

CAlfControl & aOwnerControlThe control
CAlfLayout * aParentLayout = 0If given, the parent layout.

ConstructL(CAlfControl &)

IMPORT_C voidConstructL(CAlfControl &aOwner)[virtual]

Second-phase constructor.

Parameters

CAlfControl & aOwner

DoRemoveAndDestroyAllD()

IMPORT_C voidDoRemoveAndDestroyAllD()[protected, virtual]

EndPos()

IMPORT_C const TAlfTimedValue &EndPos()const

Current end position on the path.

FindTag(const TDesC8 &)

IMPORT_C CAlfVisual *FindTag(const TDesC8 &aTag)[virtual]

Finds a visual whose tag descriptor contains a specific tag.

CAlfVisual::FindTag() is the basic implementation that checks if this visual's tag matches the specified tag. CAlfLayout::FindTag() extends the search into child visuals, covering recursively entire visual hierarchies.

Todo: how should several visuals with matching tag to be handled ??

CAlfVisual::Tag() CAlfVisual::SetTagL() CAlfVisual::IsTagged() CAlfLayout::FindTag()

Parameters

const TDesC8 & aTagTag to look for. If this tag is found as a part of a visual's colon-separated tag descriptor, it is treated as a match and the visual is returned. The tag to look for cannot contain separator characters (:).

Image()

IMPORT_C const TAlfImage &Image()const

Returns the image used by the line.

Path()

IMPORT_C CAlfCurvePath *Path()

Returns the path of the visual. The path can be modified via this reference.

PropertyOwnerExtension(const TUid &, TAny **)

IMPORT_C voidPropertyOwnerExtension(const TUid &aExtensionUid,
TAny **aExtensionParams
)[protected, virtual]

! future proofing

Parameters

const TUid & aExtensionUid
TAny ** aExtensionParams

RemoveAndDestroyAllD()

IMPORT_C voidRemoveAndDestroyAllD()[virtual]

SetAlphaFunction(MAlfMappingFunction *)

IMPORT_C voidSetAlphaFunction(MAlfMappingFunction *aFunction)

Sets the alpha mapping function that generates alpha values for the path.

Parameters

MAlfMappingFunction * aFunction

SetColor(const TRgb &)

IMPORT_C voidSetColor(const TRgb &aColor)

Sets the color of the line.

Parameters

const TRgb & aColor

SetEndPos(const TAlfTimedValue &)

IMPORT_C voidSetEndPos(const TAlfTimedValue &aEndPos)

Parameters

const TAlfTimedValue & aEndPos

SetImage(const TAlfImage &)

IMPORT_C voidSetImage(const TAlfImage &aImage)

Sets the image used by the line.

Parameters

const TAlfImage & aImage

SetPath(CAlfCurvePath *, TAlfOwnership)

IMPORT_C voidSetPath(CAlfCurvePath *aPath,
TAlfOwnershipaOwnership
)

Sets the path instance of the visual.

Parameters

CAlfCurvePath * aPath
TAlfOwnership aOwnership

SetShadowThickness(const TAlfTimedValue &)

IMPORT_C voidSetShadowThickness(const TAlfTimedValue &aShadowThickness)

Parameters

const TAlfTimedValue & aShadowThickness

SetStartPos(const TAlfTimedValue &)

IMPORT_C voidSetStartPos(const TAlfTimedValue &aStartPos)

Parameters

const TAlfTimedValue & aStartPos

SetThickness(const TAlfTimedValue &)

IMPORT_C voidSetThickness(const TAlfTimedValue &aThickness)

Parameters

const TAlfTimedValue & aThickness

SetWidthFunction(MAlfMappingFunction *)

IMPORT_C voidSetWidthFunction(MAlfMappingFunction *aFunction)

Sets the width mapping function that generates width values for the path.

Parameters

MAlfMappingFunction * aFunction

ShadowThickness()

IMPORT_C const TAlfTimedValue &ShadowThickness()const

Thickness of the shadow around the line.

StartPos()

IMPORT_C const TAlfTimedValue &StartPos()const

Current start position on the path.

Thickness()

IMPORT_C const TAlfTimedValue &Thickness()const

Thickness of the line.

UpdateChildrenLayout(TInt)

IMPORT_C voidUpdateChildrenLayout(TIntaTransitionTime = 0)[virtual]

Update the layout of all children. Subclasses can call this to recalculate the layout of all children.

Parameters

TInt aTransitionTime = 0Time for layout transition in milliseconds. Any negative value uses value given in CAlfEnv::StaticSetLayoutTransitionTime()

Member Data Documentation

TLineVisualPrivateData * iLineVisualData

TLineVisualPrivateData *iLineVisualData[private]