AttrFractalColourFill Class Reference

Fractal Colour Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrFractalColourFill:

AttrTextureColourFill AttrFractalFill AttrBitmapFill AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrFractalColourFill ()
 Constructor for a fractal fill.
 AttrFractalColourFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 ~AttrFractalColourFill ()
 Destructor for a fractal fill.
virtual NodeSimpleCopy ()
 This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
virtual UINT32 GetAttrNameID (void)
 Returns a string resource ID describing the attribute.
virtual void GetDebugDetails (StringBase *Str)
 Output details of this attribute to the Camelot debug tree dialog.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual AttributeValueGetAttributeValue ()
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the fractal fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL WriteColourDefinitions (BaseCamelotFilter *pFilter)
 Writes out colour definitions for this fill.

Protected Attributes

FractalFillAttribute Value

Detailed Description

Fractal Colour Fill Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/8/94
See also:
AttrFractalFill

Definition at line 2147 of file fillattr2.h.


Constructor & Destructor Documentation

AttrFractalColourFill::AttrFractalColourFill  ) 
 

Constructor for a fractal fill.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/9/94

Definition at line 16801 of file fillattr.cpp.

AttrFractalColourFill::AttrFractalColourFill Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
[inline]
 

Definition at line 2153 of file fillattr2.h.

02159                                          : 
02160             AttrTextureColourFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}

AttrFractalColourFill::~AttrFractalColourFill  ) 
 

Destructor for a fractal fill.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/9/94

Definition at line 16816 of file fillattr.cpp.

16817 {
16818 }


Member Function Documentation

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

Reimplemented from AttrTextureColourFill.

Definition at line 2168 of file fillattr2.h.

02168 { return &Value; }

UINT32 AttrFractalColourFill::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
Attribute description ID

Reimplemented from AttrTextureColourFill.

Definition at line 16217 of file fillattr.cpp.

16218 {
16219     return (_R(IDS_FRACTALCLOUDSGRADFILL));
16220 }

void AttrFractalColourFill::GetDebugDetails StringBase Str  )  [virtual]
 

Output details of this attribute to the Camelot debug tree dialog.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/07/94
Parameters:
Str - the string containing details of the attribute. [OUTPUTS]

Reimplemented from AttrTextureColourFill.

Definition at line 16833 of file fillattr.cpp.

16834 {
16835 #ifdef _DEBUG
16836     AttrTextureColourFill::GetDebugDetails( Str );
16837 
16838     String_256 TempStr;
16839 
16840     TempStr._MakeMsg( TEXT("\r\nFractal Fill:\r\n"));
16841     (*Str) += TempStr;
16842 
16843     INT32 Seed          = ((FractalFillAttribute*)GetAttributeValue())->Seed;
16844 //  double Gravity      = ((FractalFillAttribute*)GetAttributeValue())->Gravity.MakeDouble();
16845 //  double Graininess   = ((FractalFillAttribute*)GetAttributeValue())->Graininess.MakeDouble();
16846 //  double Squash       = ((FractalFillAttribute*)GetAttributeValue())->Squash.MakeDouble();
16847 
16848     TempStr._MakeMsg(TEXT("\r\n\nSeed = #1%ld "), 
16849                      (Seed));
16850     (*Str) += TempStr;
16851 #endif
16852 }

UINT32 AttrFractalColourFill::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 16867 of file fillattr.cpp.

16868 {     
16869     return sizeof(AttrFractalColourFill);
16870 }  

Node * AttrFractalColourFill::SimpleCopy void   )  [virtual]
 

This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
Returns:
A copy of the node, or NULL if memory runs out

Errors: If memory runs out when trying to copy, then ERROR is called with an out of memory error and the function returns NULL. Scope: protected

Reimplemented from AttrTextureColourFill.

Definition at line 16888 of file fillattr.cpp.

16889 {
16890     AttrFractalColourFill* NodeCopy = new AttrFractalColourFill();
16891     if (NodeCopy == NULL)
16892         return NULL;
16893 
16894     CopyNodeContents(NodeCopy);
16895     
16896     return NodeCopy;
16897 }  

BOOL AttrFractalColourFill::WriteColourDefinitions BaseCamelotFilter pFilter  )  [virtual]
 

Writes out colour definitions for this fill.

> virtual BOOL AttrFractalColourFill::WriteColourDefinitions (BaseCamelotFilter* pFilter)

Author:
Chris_Snook (Xara Group Ltd) <camelotdev@xara.com>
Date:
14/9/2000
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
BaseCamelotFilter::WriteRemainingAtomicTagDefinitions () Layer::WriteAtomicNodesColourRefs ()

Reimplemented from AttrFillGeometry.

Definition at line 16986 of file fillattr.cpp.

16987 {
16988     // Make sure the start & end colours are written out first.
16989     INT32 StartColRef = pFilter->WriteRecord(Value.GetStartColour());
16990     INT32 EndColRef   = pFilter->WriteRecord(Value.GetEndColour());
16991 
16992     // Are the colour refs ok?
16993     BOOL ok = (StartColRef != 0) && (EndColRef != 0);
16994     
16995     return (ok);
16996 }

BOOL AttrFractalColourFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 16962 of file fillattr.cpp.

16963 {
16964 #ifdef DO_EXPORT
16965     return WritePreChildrenWeb(pFilter);
16966 #else
16967     return FALSE;
16968 #endif
16969 }

BOOL AttrFractalColourFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the fractal fill record to the filter.

> virtual BOOL AttrFractalColourFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
26/6/96
Parameters:
pFilter = ptr to the filter [INPUTS]
Returns:
TRUE if record is written, FALSE if not
See also:
-

Reimplemented from Node.

Definition at line 16913 of file fillattr.cpp.

16914 {
16915 #ifdef DO_EXPORT
16916     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
16917 
16918     BOOL ok = TRUE;
16919 
16920     // Make sure the start & end colours are written out first.
16921     INT32 StartColRef = pFilter->WriteRecord(Value.GetStartColour());
16922     INT32 EndColRef   = pFilter->WriteRecord(Value.GetEndColour());
16923 
16924     // Are the colour refs ok?
16925     ok = (StartColRef != 0) && (EndColRef != 0);
16926 
16927     if (ok)
16928     {
16929         CamelotFileRecord Rec(pFilter,TAG_FRACTALFILL,TAG_FRACTALFILL_SIZE);
16930 
16931         if (ok) ok = Rec.Init();
16932         if (ok) ok = Rec.WriteCoord(Value.StartPoint);
16933         if (ok) ok = Rec.WriteCoord(Value.EndPoint);
16934         if (ok) ok = Rec.WriteCoord(Value.EndPoint2);
16935         if (ok) ok = Rec.WriteReference(StartColRef);
16936         if (ok) ok = Rec.WriteReference(EndColRef);
16937 
16938         if (ok) ok = Rec.WriteINT32(Value.Seed);
16939         if (ok) ok = Rec.WriteFIXED16(Value.Graininess);
16940         if (ok) ok = Rec.WriteFIXED16(Value.Gravity);
16941         if (ok) ok = Rec.WriteFIXED16(Value.Squash);
16942         if (ok) ok = Rec.WriteINT32(Value.Dpi);
16943         if (ok) ok = Rec.WriteBYTE(Value.Tileable);
16944         if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ());
16945         if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ());
16946 
16947         if (ok) ok = pFilter->Write(&Rec);
16948     }
16949 
16950     if (!ok)
16951         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
16952 
16953     return ok;
16954 #else
16955     return FALSE;
16956 #endif
16957 }


Member Data Documentation

FractalFillAttribute AttrFractalColourFill::Value [protected]
 

Definition at line 2176 of file fillattr2.h.


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