AttrNoiseColourFill Class Reference

Noisy colour Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrNoiseColourFill:

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

Public Member Functions

 AttrNoiseColourFill ()
 Constructor for a texture fill.
 AttrNoiseColourFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 ~AttrNoiseColourFill ()
 Destructor for a texture 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

NoiseFillAttribute Value

Detailed Description

Noisy colour Fill Attribute class.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/01/97
See also:
AttrTextureFractalFill

Definition at line 2194 of file fillattr2.h.


Constructor & Destructor Documentation

AttrNoiseColourFill::AttrNoiseColourFill  ) 
 

Constructor for a texture fill.

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

Definition at line 17021 of file fillattr.cpp.

17022 {
17023 }

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

Definition at line 2200 of file fillattr2.h.

02205                                          : 
02206             AttrTextureColourFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}

AttrNoiseColourFill::~AttrNoiseColourFill  ) 
 

Destructor for a texture fill.

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

Definition at line 17035 of file fillattr.cpp.

17036 {
17037 }


Member Function Documentation

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

Reimplemented from AttrTextureColourFill.

Definition at line 2214 of file fillattr2.h.

02214 { return &Value; }

UINT32 AttrNoiseColourFill::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 16222 of file fillattr.cpp.

16223 {
16224     return (_R(IDS_FRACTALPLASMAGRADFILL));
16225 }

void AttrNoiseColourFill::GetDebugDetails StringBase Str  )  [virtual]
 

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

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/01/97
Parameters:
Str - the string containing details of the attribute. [OUTPUTS]

Reimplemented from AttrTextureColourFill.

Definition at line 17051 of file fillattr.cpp.

17052 {
17053 #ifdef _DEBUG
17054     AttrTextureColourFill::GetDebugDetails( Str );
17055 
17056     String_256 TempStr;
17057 
17058     TempStr._MakeMsg( TEXT("\r\nNoise Fill:\r\n"));
17059     (*Str) += TempStr;
17060 
17061     double Scale = ((NoiseFillAttribute*)GetAttributeValue())->GetGraininess().MakeDouble();
17062 
17063     TempStr._MakeMsg(TEXT("\r\n\nScale = #1%f "), 
17064                      (Scale));
17065     (*Str) += TempStr;
17066 #endif
17067 }

UINT32 AttrNoiseColourFill::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/01/97
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 17081 of file fillattr.cpp.

17082 {     
17083     return sizeof(AttrNoiseColourFill);
17084 }  

Node * AttrNoiseColourFill::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:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/01/97
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 17102 of file fillattr.cpp.

17103 {
17104     AttrNoiseColourFill* NodeCopy = new AttrNoiseColourFill();
17105     if (NodeCopy == NULL)
17106         return NULL;
17107 
17108     CopyNodeContents(NodeCopy);
17109     
17110     return NodeCopy;
17111 }  

BOOL AttrNoiseColourFill::WriteColourDefinitions BaseCamelotFilter pFilter  )  [virtual]
 

Writes out colour definitions for this fill.

> virtual BOOL AttrNoiseColourFill::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 17198 of file fillattr.cpp.

17199 {
17200     // Make sure the start & end colours are written out first.
17201     INT32 StartColRef = pFilter->WriteRecord(Value.GetStartColour());
17202     INT32 EndColRef   = pFilter->WriteRecord(Value.GetEndColour());
17203 
17204     // Are the colour refs ok?
17205     BOOL ok = (StartColRef != 0) && (EndColRef != 0);
17206     
17207     return (ok);
17208 }

BOOL AttrNoiseColourFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 17173 of file fillattr.cpp.

17174 {
17175 #ifdef DO_EXPORT
17176     return WritePreChildrenWeb(pFilter);
17177 #else
17178     return FALSE;
17179 #endif
17180 }

BOOL AttrNoiseColourFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the fractal fill record to the filter.

> virtual BOOL AttrNoiseColourFill::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 17127 of file fillattr.cpp.

17128 {
17129 #ifdef DO_EXPORT
17130     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
17131 
17132     BOOL ok = TRUE;
17133 
17134     // Make sure the start & end colours are written out first.
17135     INT32 StartColRef = pFilter->WriteRecord(Value.GetStartColour());
17136     INT32 EndColRef   = pFilter->WriteRecord(Value.GetEndColour());
17137 
17138     // Are the colour refs ok?
17139     ok = (StartColRef != 0) && (EndColRef != 0);
17140 
17141     if (ok)
17142     {
17143         CamelotFileRecord Rec(pFilter,TAG_NOISEFILL,TAG_NOISEFILL_SIZE);
17144 
17145         if (ok) ok = Rec.Init();
17146         if (ok) ok = Rec.WriteCoord(Value.StartPoint);          // INT32,INT32  4,4
17147         if (ok) ok = Rec.WriteCoord(Value.EndPoint);            //              4,4
17148         if (ok) ok = Rec.WriteCoord(Value.EndPoint2);           //              4,4
17149         if (ok) ok = Rec.WriteReference(StartColRef);           //              4
17150         if (ok) ok = Rec.WriteReference(EndColRef);             //              4
17151         if (ok) ok = Rec.WriteFIXED16(Value.GetGraininess());   //              4
17152         if (ok) ok = Rec.WriteINT32(Value.GetSeed());           //              4
17153         if (ok) ok = Rec.WriteINT32(Value.GetFractalDPI());     //              4
17154         if (ok) ok = Rec.WriteBYTE(Value.GetTileable());        //              1       = 45
17155         if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ());
17156         if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ());
17157 
17158         if (ok) ok = pFilter->Write(&Rec);
17159     }
17160 
17161     if (!ok)
17162         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
17163 
17164     return ok;
17165 #else
17166     return FALSE;
17167 #endif
17168 }


Member Data Documentation

NoiseFillAttribute AttrNoiseColourFill::Value [protected]
 

Definition at line 2222 of file fillattr2.h.


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