AttrTranspFillRampChange Class Reference

An attribute to control the changes of transparency on a fill ramp. More...

#include <fillattr2.h>

Inheritance diagram for AttrTranspFillRampChange:

AttrValueChange AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrTranspFillRampChange ()
 A class to edit colour ramps.
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
virtual AttrFillGeometryMutateFill (AttrFillGeometry *FillToMutate)
 Changes the colours in a fill ramp. FillToMutate contains all the info necessary to do the edit.
virtual AttributeValueGetAttributeValue ()
virtual CCRuntimeClassGetAttributeType ()
 Determines the scope of the value change.
void InitForTranspAdd (UINT32 t, float pos)
 All the init functions to set this AttrTranspFillRampChange object.
void InitForTranspEdit (UINT32 i, UINT32 t)
void InitForSelEdit (UINT32 transparency)
RampEdit GetAction () const
UINT32 GetIndex () const
float GetPosition () const

Protected Attributes

RampEdit action
UINT32 index
float position
FlatTranspFillAttribute Value

Detailed Description

An attribute to control the changes of transparency on a fill ramp.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97

Definition at line 528 of file fillattr2.h.


Constructor & Destructor Documentation

AttrTranspFillRampChange::AttrTranspFillRampChange  ) 
 

A class to edit colour ramps.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97

Definition at line 4648 of file fillattr.cpp.

04649 {
04650     action   = ACT_DONOTHING;
04651     index    = FILLRAMP_ILLEGALINDEX;
04652     position = 0.0f;
04653 }


Member Function Documentation

RampEdit AttrTranspFillRampChange::GetAction  )  const [inline]
 

Definition at line 548 of file fillattr2.h.

00548 { return action; }

virtual CCRuntimeClass* AttrTranspFillRampChange::GetAttributeType  )  [inline, virtual]
 

Determines the scope of the value change.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/12/94
Returns:
A CC_RUNTIME_CLASS depending on whether this should change colour or transparency attribute.

Reimplemented from AttrValueChange.

Definition at line 539 of file fillattr2.h.

virtual AttributeValue* AttrTranspFillRampChange::GetAttributeValue  )  [inline, virtual]
 

Implements AttrValueChange.

Definition at line 538 of file fillattr2.h.

00538 { return &Value; }

UINT32 AttrTranspFillRampChange::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97
Returns:
Attribute description ID

Reimplemented from AttrValueChange.

Definition at line 4699 of file fillattr.cpp.

04700 {
04701     return (_R(IDS_FILLRAMP_TRANSPCHANGE));
04702 }

UINT32 AttrTranspFillRampChange::GetIndex  )  const [inline]
 

Definition at line 549 of file fillattr2.h.

00549 { return index;  }

float AttrTranspFillRampChange::GetPosition  )  const [inline]
 

Definition at line 550 of file fillattr2.h.

00550 { return position; }

void AttrTranspFillRampChange::InitForSelEdit UINT32  transparency  ) 
 

Definition at line 4681 of file fillattr.cpp.

04682 {
04683     action = ACT_EDITTRANSPOFSELECTED;
04684     index  = FILLRAMP_ILLEGALINDEX;
04685     Value.SetStartTransp(&t);
04686 }

void AttrTranspFillRampChange::InitForTranspAdd UINT32  t,
float  pos
 

All the init functions to set this AttrTranspFillRampChange object.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97

Definition at line 4667 of file fillattr.cpp.

04668 {
04669     action   = ACT_CREATENEWTRANSP;
04670     position = pos;
04671     Value.SetStartTransp(&t);
04672 }

void AttrTranspFillRampChange::InitForTranspEdit UINT32  i,
UINT32  t
 

Definition at line 4674 of file fillattr.cpp.

04675 {
04676     action = ACT_EDITTRANSPOFITEM;
04677     index  = i;
04678     Value.SetStartTransp(&t);
04679 }

AttrFillGeometry * AttrTranspFillRampChange::MutateFill AttrFillGeometry FillToMutate  )  [virtual]
 

Changes the colours in a fill ramp. FillToMutate contains all the info necessary to do the edit.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/03/97
Parameters:
FillToMutate = a pointer to a fill attribute to alter. [INPUTS]
Returns:
A pointer to a copy which contains the alteration.

Reimplemented from AttrValueChange.

Definition at line 4718 of file fillattr.cpp.

04719 { 
04720 #if !defined(EXCLUDE_FROM_RALPH)
04721     if (FillToMutate->IsVisible() && 
04722         FillToMutate->GetSelectionCount() == 0 &&
04723         SelectionCount > 0)
04724         return NULL;
04725 
04726     // Make a copy of this Fill to change
04727     AttrFillGeometry* NewFill = (AttrFillGeometry*)FillToMutate->SimpleCopy();
04728     if (NewFill == NULL)
04729         return NULL;
04730 
04731     // do the actual editing here
04732     BOOL Changed = NewFill->EditTranspFillRamp(this);
04733 
04734     // Did we change any colours ?
04735     if (!Changed)
04736     {
04737         delete NewFill;
04738         return NULL;
04739     }
04740 
04741     // Return the Mutated Fill
04742     return NewFill;
04743 #else
04744     return NULL;
04745 #endif
04746 }


Member Data Documentation

RampEdit AttrTranspFillRampChange::action [protected]
 

Definition at line 553 of file fillattr2.h.

UINT32 AttrTranspFillRampChange::index [protected]
 

Definition at line 554 of file fillattr2.h.

float AttrTranspFillRampChange::position [protected]
 

Definition at line 555 of file fillattr2.h.

FlatTranspFillAttribute AttrTranspFillRampChange::Value [protected]
 

Definition at line 557 of file fillattr2.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:50:39 2007 for Camelot by  doxygen 1.4.4