AttrFlatTranspFill Class Reference

Flat Transparency Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrFlatTranspFill:

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

Public Member Functions

 AttrFlatTranspFill ()
 AttrFlatTranspFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a Flat 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 CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
virtual BOOL IsVisible ()
virtual BOOL NeedsTransparency () const
 Called.
AttrFillGeometryChangeAttrValue (AttrValueChange *pValue)
virtual BOOL IsATranspFill () const
 Virtual function for determining if the node is an attribute.
virtual BOOL HasEquivalentDefaultValue (BOOL bAppearance=FALSE)
 Determine whether this attribute has the default value or not.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the flat transparent fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL IsSeeThrough (BOOL CheckIndirectAttrs)

Protected Attributes

FlatTranspFillAttribute Value

Detailed Description

Flat Transparency Fill Attribute class.

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

Definition at line 634 of file fillattr2.h.


Constructor & Destructor Documentation

AttrFlatTranspFill::AttrFlatTranspFill  )  [inline]
 

Definition at line 639 of file fillattr2.h.

00639 : AttrFlatFill() {}

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

Definition at line 640 of file fillattr2.h.

00645                                      : 
00646         AttrFlatFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

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

Reimplemented from AttrFillGeometry.

Definition at line 661 of file fillattr2.h.

00661 { return ChangeTransp(pValue); }

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

Reimplemented from NodeAttribute.

Definition at line 655 of file fillattr2.h.

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

Implements AttrFillGeometry.

Definition at line 656 of file fillattr2.h.

00656 { return &Value; }

UINT32 AttrFlatTranspFill::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 NodeAttribute.

Definition at line 6076 of file fillattr.cpp.

06077 {
06078     return (_R(IDS_FILL_COLOUR));
06079 }                                  

void AttrFlatTranspFill::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 NodeRenderable.

Definition at line 6092 of file fillattr.cpp.

06093 {
06094 #ifdef _DEBUG
06095     NodeAttribute::GetDebugDetails( Str );
06096 
06097     String_256 TempStr;
06098 
06099     TempStr._MakeMsg( TEXT("\r\nFill") );
06100     (*Str) += TempStr;
06101 
06102     TempStr._MakeMsg(TEXT("\r\nStart"));
06103     (*Str) += TempStr;
06104 
06105     TempStr._MakeMsg(TEXT("\r\nFill value = #1%u"), *GetStartTransp() );    
06106     (*Str) += TempStr;
06107 
06108     TempStr._MakeMsg(TEXT("\r\nFill type = #1%u"), GetTranspType() );   
06109     (*Str) += TempStr;
06110 #endif
06111 }

UINT32 AttrFlatTranspFill::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 6126 of file fillattr.cpp.

06127 {     
06128     return sizeof(AttrFlatTranspFill);
06129 }  

BOOL AttrFlatTranspFill::HasEquivalentDefaultValue BOOL  bAppearance = FALSE  )  [virtual]
 

Determine whether this attribute has the default value or not.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/05/2005
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this node has a value equivalent to the relevant FALSE otherwise

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 6198 of file fillattr.cpp.

06199 {
06200     // Slight bodge - we will assume that the default transparency is fully opaque
06201     return (Value.TranspType==TT_NoTranspType || (Value.TranspType==TT_Mix && Value.Transp == 0));
06202 }

virtual BOOL AttrFlatTranspFill::IsATranspFill  )  const [inline, virtual]
 

Virtual function for determining if the node is an attribute.

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

Errors:

Reimplemented from NodeAttribute.

Definition at line 663 of file fillattr2.h.

00663 { return TRUE; } 

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

Reimplemented from NodeAttribute.

Definition at line 673 of file fillattr2.h.

00673                                                        {
00674         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
00675                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
00676     }

virtual BOOL AttrFlatTranspFill::IsVisible  )  [inline, virtual]
 

Reimplemented from AttrFillGeometry.

Definition at line 658 of file fillattr2.h.

00658 { return IsTranspMeshVisible(); }

BOOL AttrFlatTranspFill::NeedsTransparency  )  const [virtual]
 

Called.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/1/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this node requires transparency mode to render properly.

Errors: -

See also:
Node::AttachNode

Reimplemented from AttrFillGeometry.

Definition at line 20097 of file fillattr.cpp.

20098 {
20099     AttrFlatTranspFill* pNonConst = (AttrFlatTranspFill*) this;
20100     return pNonConst->GetTranspType() != TT_Mix || *(pNonConst->GetStartTransp()) != 0;
20101 }

void AttrFlatTranspFill::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Flat Fill Colour attribute.

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

Reimplemented from NodeAttribute.

Definition at line 6034 of file fillattr.cpp.

06035 {
06036     pRender->SetTranspFillGeometry(&Value, FALSE);
06037 }

Node * AttrFlatTranspFill::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 NodeAttribute.

Definition at line 6054 of file fillattr.cpp.

06055 {
06056     AttrFlatTranspFill* NodeCopy = new AttrFlatTranspFill();
06057     if (NodeCopy == NULL)
06058         return NULL;
06059 
06060     CopyNodeContents(NodeCopy);
06061     
06062     return NodeCopy;
06063 }  

BOOL AttrFlatTranspFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 6174 of file fillattr.cpp.

06175 {
06176 #ifdef DO_EXPORT
06177     return WritePreChildrenWeb(pFilter);
06178 #else
06179     return FALSE;
06180 #endif
06181 }

BOOL AttrFlatTranspFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the flat transparent fill record to the filter.

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

06147 {
06148 #ifdef DO_EXPORT
06149     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
06150     ERROR3IF(Value.Transp     > 255,"Transparency level is too high to be stored as a byte");
06151     ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte");
06152 
06153     BOOL ok = TRUE;
06154 
06155     CamelotFileRecord Rec(pFilter,TAG_FLATTRANSPARENTFILL,TAG_FLATTRANSPARENTFILL_SIZE);
06156 
06157     if (ok) ok = Rec.Init();
06158     if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp));
06159     if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType));
06160     if (ok) ok = pFilter->Write(&Rec);
06161 
06162     if (!ok)
06163         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
06164 
06165     return ok;
06166 #else
06167     return FALSE;
06168 #endif
06169 }


Member Data Documentation

FlatTranspFillAttribute AttrFlatTranspFill::Value [protected]
 

Definition at line 679 of file fillattr2.h.


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