AttrFourColColourFill Class Reference

FourCol Graduated Colour Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrFourColColourFill:

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

Public Member Functions

 AttrFourColColourFill ()
 AttrFourColColourFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a FourCol Fill Colour attribute.
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.
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 void RenderFillBlobs (RenderRegion *pRender)
 Renders the grad fills arrow blob when requested to by its selected parent.
virtual CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
AttrFillGeometryChangeAttrValue (AttrValueChange *pValue)
virtual BOOL IsAColourFill () const
 Virtual function for determining if the node is a Colour Fill attribute.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the FourCol fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
 Writes the FourCol fill record to the filter.
virtual BOOL WriteColourDefinitions (BaseCamelotFilter *pFilter)
 Writes out colour definitions for this fill.
virtual BOOL IsSeeThrough (BOOL CheckIndirectAttrs)

Protected Attributes

FourColFillAttribute Value

Detailed Description

FourCol Graduated Colour Fill Attribute class.

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

Definition at line 1680 of file fillattr2.h.


Constructor & Destructor Documentation

AttrFourColColourFill::AttrFourColColourFill  )  [inline]
 

Definition at line 1685 of file fillattr2.h.

01685 : AttrFourColFill() {}

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

Definition at line 1686 of file fillattr2.h.

01691                                      : 
01692         AttrFourColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

AttrFillGeometry* AttrFourColColourFill::ChangeAttrValue AttrValueChange pValue  )  [inline, virtual]
 

Reimplemented from AttrFillGeometry.

Definition at line 1705 of file fillattr2.h.

01705 { return ChangeColour(pValue); }

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

Reimplemented from NodeAttribute.

Definition at line 1702 of file fillattr2.h.

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

Implements AttrFourColFill.

Definition at line 1703 of file fillattr2.h.

01703 { return &Value; }

UINT32 AttrFourColColourFill::GetAttrNameID void   )  [virtual]
 

Returns a string resource ID describing the attribute.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Returns:
Attribute description ID

Reimplemented from NodeAttribute.

Definition at line 13277 of file fillattr.cpp.

13278 {
13279     return (_R(IDS_FOURCOLGRADFILL)); 
13280 }                                  

void AttrFourColColourFill::GetDebugDetails StringBase Str  )  [virtual]
 

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

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
Str - the string containing details of the attribute. [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 13295 of file fillattr.cpp.

13296 {
13297 #ifdef _DEBUG
13298     NodeAttribute::GetDebugDetails( Str );
13299 
13300     String_256 TempStr;
13301 
13302     TempStr._MakeMsg( TEXT("\r\nFour colour graduated fill:\r\n"));
13303     (*Str) += TempStr;
13304 
13305 //  TempStr._MakeMsg(TEXT("\r\nStart"));
13306 //  (*GetStartColour()).GetDebugDetails(&TempStr);
13307 //  (*Str) += TempStr;
13308 
13309 //  TempStr._MakeMsg(TEXT("\r\nEnd"));
13310 //  (*GetEndColour()).GetDebugDetails(&TempStr);
13311 //  (*Str) += TempStr;
13312 
13313 //  TempStr._MakeMsg(TEXT("\r\nEnd2"));
13314 //  (*GetEndColour2()).GetDebugDetails(&TempStr);
13315 //  (*Str) += TempStr;
13316 
13317 //  TempStr._MakeMsg(TEXT("\r\nEnd3"));
13318 //  (*GetEndColour3()).GetDebugDetails(&TempStr);
13319 //  (*Str) += TempStr;
13320 
13321     TempStr._MakeMsg(TEXT("\r\nStart = (#1%ld, #2%ld)"), 
13322                      (*GetStartPoint()).x, (*GetStartPoint()).y);
13323     (*Str) += TempStr;
13324 
13325     TempStr._MakeMsg(TEXT("\r\nEnd = (#1%ld, #2%ld) "), 
13326                      (*GetEndPoint()).x, (*GetEndPoint()).y);
13327     (*Str) += TempStr;
13328 
13329     TempStr._MakeMsg(TEXT("\r\n3rd = (#1%ld, #2%ld) "), 
13330                      (*GetEndPoint2()).x, (*GetEndPoint2()).y);
13331     (*Str) += TempStr;
13332 #endif
13333 }

UINT32 AttrFourColColourFill::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

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

Reimplemented from Node.

Definition at line 13349 of file fillattr.cpp.

13350 {     
13351     return sizeof(AttrFourColColourFill);
13352 }  

virtual BOOL AttrFourColColourFill::IsAColourFill  )  const [inline, virtual]
 

Virtual function for determining if the node is a Colour Fill attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/2/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the node is a AttrColourFill, will return TRUE

Errors:

Reimplemented from NodeAttribute.

Definition at line 1707 of file fillattr2.h.

01707 { return TRUE; }

virtual BOOL AttrFourColColourFill::IsSeeThrough BOOL  CheckIndirectAttrs  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 1717 of file fillattr2.h.

01718     {
01719         return (GetStartColour() != NULL    &&  GetStartColour()->IsTransparent()   &&
01720                 GetEndColour() != NULL      &&  GetEndColour()->IsTransparent());
01721     }

void AttrFourColColourFill::Render RenderRegion pRender  )  [virtual]
 

'Renders' a FourCol Fill Colour attribute.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96

Reimplemented from NodeAttribute.

Definition at line 13181 of file fillattr.cpp.

13182 {
13183     pRender->SetFillGeometry(&Value, FALSE);
13184 }

void AttrFourColColourFill::RenderFillBlobs RenderRegion pRender  )  [virtual]
 

Renders the grad fills arrow blob when requested to by its selected parent.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
pRender - The region to render the blobs to. [INPUTS]

Reimplemented from AttrFourColFill.

Definition at line 13227 of file fillattr.cpp.

13228 {
13229 #if !defined(EXCLUDE_FROM_RALPH)
13230     if (!IsVisible())
13231         return;     // We're in Fill Transparency Mode
13232 
13233     // Don't bother if this fill is being edited as a copy of it
13234     // we be rendered thoughout the drag op
13235     if (IsFillBeingEdited())
13236         return;
13237 
13238     // Ignore this if the mesh is the same as the last one rendered.
13239     if (CheckPreviousFillMesh())
13240         return;
13241 
13242     // Get the control points
13243     DocCoord StartPoint = *GetStartPoint();
13244     DocCoord EndPoint = *GetEndPoint();
13245     DocCoord EndPoint2 = *GetEndPoint2();
13246     DocCoord EndPoint3 = EndPoint2 + EndPoint - StartPoint;
13247 
13248     DocCoord ControlPoints[4];
13249     ControlPoints[FILLCONTROL_STARTPOINT] = StartPoint;
13250     ControlPoints[FILLCONTROL_ENDPOINT] = EndPoint;
13251     ControlPoints[FILLCONTROL_ENDPOINT2] = EndPoint2;
13252     ControlPoints[FILLCONTROL_ENDPOINT3] = EndPoint3;
13253 
13254     // Render a nice pretty Fill Mesh thingy
13255     RenderFillMesh(pRender, ControlPoints, SelectionState, 4);
13256 
13257     // This call was removed by Gerry (2/9/96) as it causes blob problems
13258     // If we are removing blobs then force all blobs to be deselected
13259 //  if ((Camelot.GetBlobManager())->IsRemovingBlobs())
13260 //      DeselectAllNoRedraw();
13261 #endif
13262 }

Node * AttrFourColColourFill::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:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
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 NodeAttribute.

Definition at line 13203 of file fillattr.cpp.

13204 {
13205     AttrFourColColourFill* NodeCopy = new AttrFourColColourFill();
13206     if (NodeCopy == NULL)
13207         return NULL;
13208 
13209     CopyNodeContents(NodeCopy);
13210     
13211     return NodeCopy;
13212 }  

BOOL AttrFourColColourFill::WriteColourDefinitions BaseCamelotFilter pFilter  )  [virtual]
 

Writes out colour definitions for this fill.

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

13447 {
13448     // Must write out the colours first
13449     INT32 StartColRef = pFilter->WriteRecord(&Value.Colour);
13450     INT32 EndColRef  = pFilter->WriteRecord(&Value.EndColour);
13451     INT32 EndCol2Ref     = pFilter->WriteRecord(&Value.EndColour2);
13452     INT32 EndCol3Ref     = pFilter->WriteRecord(&Value.EndColour3);
13453 
13454     // Are the colour references ok?
13455     BOOL ok = ((StartColRef != 0) && (EndColRef != 0) && (EndCol2Ref != 0) && (EndCol3Ref != 0));
13456     
13457     return (ok);
13458 }

BOOL AttrFourColColourFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Writes the FourCol fill record to the filter.

> virtual BOOL AttrFourColColourFill::WritePreChildrenNative(BaseCamelotFilter* pFilter)

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/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 13422 of file fillattr.cpp.

13423 {
13424 #ifdef DO_EXPORT
13425     return WritePreChildrenWeb(pFilter);
13426 #else
13427     return FALSE;
13428 #endif
13429 }

BOOL AttrFourColColourFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the FourCol fill record to the filter.

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

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/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 13369 of file fillattr.cpp.

13370 {
13371 #ifdef DO_EXPORT
13372     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
13373 
13374     // Must write out the colours first
13375     INT32 StartColRef = pFilter->WriteRecord(&Value.Colour);
13376     INT32 EndColRef  = pFilter->WriteRecord(&Value.EndColour);
13377     INT32 EndCol2Ref     = pFilter->WriteRecord(&Value.EndColour2);
13378     INT32 EndCol3Ref     = pFilter->WriteRecord(&Value.EndColour3);
13379 
13380     // Are the colour references ok?
13381     BOOL ok = ((StartColRef != 0) && (EndColRef != 0) && (EndCol2Ref != 0) && (EndCol3Ref != 0));
13382         
13383     if (ok)
13384     {
13385         CamelotFileRecord Rec(pFilter,TAG_FOURCOLFILL,TAG_FOURCOLFILL_SIZE);
13386 
13387         if (ok) ok = Rec.Init();
13388         if (ok) ok = Rec.WriteCoord(Value.StartPoint);
13389         if (ok) ok = Rec.WriteCoord(Value.EndPoint);
13390         if (ok) ok = Rec.WriteCoord(Value.EndPoint2);
13391         if (ok) ok = Rec.WriteReference(StartColRef);
13392         if (ok) ok = Rec.WriteReference(EndColRef);
13393         if (ok) ok = Rec.WriteReference(EndCol2Ref);
13394         if (ok) ok = Rec.WriteReference(EndCol3Ref);
13395         if (ok) ok = pFilter->Write(&Rec);
13396     }
13397 
13398     if (!ok)
13399         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
13400 
13401     return ok;
13402 #else
13403     return FALSE;
13404 #endif
13405 }


Member Data Documentation

FourColFillAttribute AttrFourColColourFill::Value [protected]
 

Definition at line 1724 of file fillattr2.h.


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