TranspFillMappingAttribute Class Reference

Specifies how a fill graduation behaves, e.g. linear, sinusoidal and so on. More...

#include <fillval.h>

Inheritance diagram for TranspFillMappingAttribute:

AttributeValue CCObject SimpleCCObject TranspFillMappingLinearAttribute TranspFillMappingSinAttribute List of all members.

Public Member Functions

 TranspFillMappingAttribute ()
 Constructor for transp mapping attributes.
virtual void Restore (RenderRegion *, BOOL)
 Restores the fill type attribute for the given render region. i.e. all paths filled will now be filled with this fill attribute.
virtual void Render (RenderRegion *, BOOL Temp=FALSE)
 Sets the fill type attribute for the given render region. i.e. all paths filled will now be filled with this fill attribute.
virtual void SimpleCopy (AttributeValue *)
 See AttributeValue::SimpleCopy.
virtual FillMappingAttributeMakeSimilarNonTranspFillMapping (void)
virtual BOOL IsDifferent (AttributeValue *)
 Compare two AttributeValue objects. The base class version always returns TRUE - derived classes should override this function to provide functionality.
virtual TranspFillMappingAttributeoperator= (TranspFillMappingAttribute &Attrib)
virtual INT32 operator== (const TranspFillMappingAttribute &Attrib)

Static Public Member Functions

static BOOL Init ()
 Registers fill mapping attribute, and provides a default attribute to give linear graduations.

Public Attributes

INT32 Repeat

Detailed Description

Specifies how a fill graduation behaves, e.g. linear, sinusoidal and so on.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
See also:
FillFunctionLinearAttribute; FillFunctionSinAttribute

Definition at line 1781 of file fillval.h.


Constructor & Destructor Documentation

TranspFillMappingAttribute::TranspFillMappingAttribute  ) 
 

Constructor for transp mapping attributes.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/94
See also:
FillMappingAttribute; RenderStack; AttributeValue; NodeAttribute; FillMappingAttribute::Restore; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Definition at line 8358 of file fillval.cpp.

08359 {
08360     Repeat = 2;
08361 }


Member Function Documentation

BOOL TranspFillMappingAttribute::Init void   )  [static]
 

Registers fill mapping attribute, and provides a default attribute to give linear graduations.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
TRUE - initialised ok; FALSE if not.

Errors: Out of memory.

See also:
AttributeManager

Reimplemented from SimpleCCObject.

Definition at line 8377 of file fillval.cpp.

08378 {
08379     // Default to simple linear mapping (ignored for flat fills, obviously)
08380     TranspFillMappingAttribute *pAttr = new TranspFillMappingLinearAttribute;
08381     if (pAttr==NULL)
08382         // error message has already been set by new
08383         return FALSE;
08384 
08385     UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 
08386                                                          pAttr);
08387     ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising TranspFillMappingAttribute");
08388     ERROR2IF(ID != ATTR_TRANSPFILLMAPPING, FALSE, "Incorrect ID for TranspFillMappingAttribute");
08389 
08390     return TRUE;
08391 }

BOOL TranspFillMappingAttribute::IsDifferent AttributeValue pVal  )  [virtual]
 

Compare two AttributeValue objects. The base class version always returns TRUE - derived classes should override this function to provide functionality.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/04/94
Parameters:
pAttr - the attribute to compare against this one. [INPUTS]
Returns:
TRUE if objects represent different attributes (e.g. one is red and the other is blue); FALSE otherwise (i.e. they represent the same attribute, e.g. both represent 0.25pt lines).
See also:
AttributeManager::ApplyBasedOnDefaults

Reimplemented from AttributeValue.

Definition at line 8451 of file fillval.cpp.

08452 {
08453     if (pVal->GetRuntimeClass() != GetRuntimeClass())
08454         return TRUE;
08455 
08456     return (Repeat != ((TranspFillMappingAttribute*)pVal)->Repeat);
08457 }

FillMappingAttribute * TranspFillMappingAttribute::MakeSimilarNonTranspFillMapping void   )  [virtual]
 

Reimplemented in TranspFillMappingLinearAttribute, and TranspFillMappingSinAttribute.

Definition at line 8478 of file fillval.cpp.

08479 {
08480     FillMappingAttribute *pNewAttr = new FillMappingAttribute;  
08481     if (pNewAttr != NULL)
08482     {
08483         pNewAttr->Repeat = Repeat;
08484     }
08485 
08486     return pNewAttr;
08487 }

TranspFillMappingAttribute & TranspFillMappingAttribute::operator= TranspFillMappingAttribute Attrib  )  [virtual]
 

Definition at line 8459 of file fillval.cpp.

08460 {
08461     Repeat = Attrib.Repeat;
08462 
08463     return *this;
08464 }

INT32 TranspFillMappingAttribute::operator== const TranspFillMappingAttribute Attrib  )  [virtual]
 

Definition at line 8466 of file fillval.cpp.

08467 {
08468     if (Attrib.GetRuntimeClass() != GetRuntimeClass())
08469         return FALSE;
08470 
08471     return (Repeat == Attrib.Repeat);
08472 }

void TranspFillMappingAttribute::Render RenderRegion pRegion,
BOOL  Temp = FALSE
[virtual]
 

Sets the fill type attribute for the given render region. i.e. all paths filled will now be filled with this fill attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Parameters:
pRegion - the render region to render this attribute into. [INPUTS]
See also:
FillMappingAttribute; RenderStack; AttributeValue; NodeAttribute; FillMappingAttribute::Restore; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 8424 of file fillval.cpp.

08425 {
08426     pRegion->SetTranspFillMapping(this, Temp);
08427 }

void TranspFillMappingAttribute::Restore RenderRegion pRegion,
BOOL  Temp
[virtual]
 

Restores the fill type attribute for the given render region. i.e. all paths filled will now be filled with this fill attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Parameters:
pRegion - the render region to restore the attribute into. [INPUTS] Temp - TRUE if this is a temporary attribute, FALSE if it is permanent (e.g. it's in a document tree).
See also:
FillMappingAttribute; RenderStack; AttributeValue; NodeAttribute; FillMappingAttribute::Render; AttributeValue::Render; AttributeValue::Restore; AttributeValue::SimpleCopy

Implements AttributeValue.

Definition at line 8446 of file fillval.cpp.

08447 {
08448     pRegion->RestoreTranspFillMapping(this, Temp);
08449 }

void TranspFillMappingAttribute::SimpleCopy AttributeValue pValue  )  [virtual]
 

See AttributeValue::SimpleCopy.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/11/94
Parameters:
pAttr - pointer to the AttributeValue to copy. [INPUTS]

Implements AttributeValue.

Definition at line 8404 of file fillval.cpp.

08405 {
08406     Repeat = ((TranspFillMappingAttribute *) pValue)->Repeat;
08407 }


Member Data Documentation

INT32 TranspFillMappingAttribute::Repeat
 

Definition at line 1798 of file fillval.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:02:19 2007 for Camelot by  doxygen 1.4.4