AttrBevelContrast Class Reference

Bevel indent attribute. More...

#include <attrbev.h>

Inheritance diagram for AttrBevelContrast:

AttrBevel NodeAttribute NodeRenderable Node CCObject SimpleCCObject List of all members.

Public Member Functions

 AttrBevelContrast ()
 Default constructor for Line Width Attribute class.
 AttrBevelContrast (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
 Creates a bValue Attribute.
virtual CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
virtual AttrIndex GetAttributeIndex ()
void Render (RenderRegion *pRender)
 'Renders' a Line Width 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 INT32 operator== (const NodeAttribute &NodeAttrib)
 A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
virtual UINT32 GetAttrNameID (void)
 Returns back a string resource ID describing the attribute.
void ShowDebugTreeDetails () const
 Displays debugging info of the tree.
void GetDebugDetails (StringBase *Str)
 For obtaining debug information about the Node.
virtual UINT32 GetNodeSize () const
 For finding the size of the node.
virtual void Transform (TransformBase &)
 Scale the Line Width.
virtual BOOL EffectsParentBounds ()
 Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the line width record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
void SetValue (INT32 NewValue)
BOOL Blend (BlendAttrParam *pBlendParam)
 Blends this light angle to another.
virtual void PolyCopyNodeContents (NodeRenderable *pNodeCopy)
 Polymorphically copies the contents of this node to another.

Public Attributes

BevelAttributeValueContrast Value

Private Member Functions

void CopyNodeContents (AttrBevelContrast *NodeCopy)
 This method copies the node's contents to the node pointed to by NodeCopy.

Detailed Description

Bevel indent attribute.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/11/98

Definition at line 354 of file attrbev.h.


Constructor & Destructor Documentation

AttrBevelContrast::AttrBevelContrast  ) 
 

Default constructor for Line Width Attribute class.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 759 of file attrbev.cpp.

00760 {
00761 }

AttrBevelContrast::AttrBevelContrast Node ContextNode,
AttachNodeDirection  Direction,
BOOL  Locked = FALSE,
BOOL  Mangled = FALSE,
BOOL  Marked = FALSE,
BOOL  Selected = FALSE
 

Creates a bValue Attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 734 of file attrbev.cpp.

00740              : AttrBevel(ContextNode, Direction, Locked, Mangled, Marked, Selected)  
00741 {                         
00742 } 


Member Function Documentation

BOOL AttrBevelContrast::Blend BlendAttrParam pBlendParam  )  [virtual]
 

Blends this light angle to another.

Author:
David_McClarnon (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/12/99
Parameters:
The blend attribute param [INPUTS]
See also:

Reimplemented from NodeAttribute.

Definition at line 937 of file attrbev.cpp.

00938 {
00939     ERROR2IF(pBlendParam == NULL,FALSE,"pBlendParam == NULL");
00940     ERROR3IF(!(pBlendParam->GetOtherAttr()->IS_KIND_OF(AttrBevelContrast)),
00941         "Blend attribute isn't a bevel contrast attribute");
00942 
00943     AttrBevelContrast * pBlendedAttr = NULL;
00944 
00945     // assign the other attribute we're looking at
00946     AttrBevelContrast * pOtherAttr = (AttrBevelContrast *)pBlendParam->GetOtherAttr();
00947 
00948     // split at the half way mark
00949     if (pBlendParam->GetBlendRatio() <= 0.5)
00950     {
00951         pBlendedAttr = (AttrBevelContrast *)SimpleCopy();
00952     }
00953     else
00954     {
00955         pBlendedAttr = (AttrBevelContrast *)pOtherAttr->SimpleCopy();
00956     }
00957 
00958     // set the blended attribute
00959     pBlendParam->SetBlendedAttr(pBlendedAttr);
00960     
00961     if (!pBlendedAttr)
00962         return FALSE;
00963 
00964     double Contrast1        = Value.m_Contrast;
00965     double Contrast2        = pOtherAttr->Value.m_Contrast;
00966     double NewContrast      = ((Contrast2 - Contrast1) * pBlendParam->GetBlendRatio()) +
00967                                 Contrast1;
00968 
00969     // set the blended attribute's values
00970     pBlendedAttr->Value.m_Contrast = (INT32)NewContrast;
00971 
00972     return TRUE;
00973 }

void AttrBevelContrast::CopyNodeContents AttrBevelContrast NodeCopy  )  [private]
 

This method copies the node's contents to the node pointed to by NodeCopy.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/4/93
Parameters:
[INPUTS] 
A copy of this node [OUTPUTS]
Returns:
-

Errors: An assertion failure will occur if NodeCopy is NULL

Scope: protected

Definition at line 896 of file attrbev.cpp.

00897 {
00898     NodeAttribute::CopyNodeContents( NodeCopy );
00899 
00900     NodeCopy->Value = Value;
00901 } 

virtual BOOL AttrBevelContrast::EffectsParentBounds  )  [inline, virtual]
 

Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
4/4/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if the node will effect the bounds of it's parent.
See also:
NodeAttribute::GetAttrBoundingRect

Reimplemented from NodeAttribute.

Definition at line 384 of file attrbev.h.

00384 { return FALSE; }

virtual AttrIndex AttrBevelContrast::GetAttributeIndex  )  [inline, virtual]
 

Reimplemented from NodeAttribute.

Definition at line 369 of file attrbev.h.

00369 { return ATTR_BEVELCONTRAST; }

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

Reimplemented from NodeAttribute.

Definition at line 367 of file attrbev.h.

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

Reimplemented from NodeAttribute.

Definition at line 368 of file attrbev.h.

00368 { return &Value; }

UINT32 AttrBevelContrast::GetAttrNameID void   )  [virtual]
 

Returns back a string resource ID describing the attribute.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
22/2/94
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
Attribute description ID

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 872 of file attrbev.cpp.

00873 {
00874     return (_R(IDS_BEVEL_CONTRAST_ID)); 
00875 }               

void AttrBevelContrast::GetDebugDetails StringBase Str  )  [virtual]
 

For obtaining debug information about the Node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/9/93
Parameters:
Str,: String giving debug info about the node [OUTPUTS]

Reimplemented from NodeRenderable.

Definition at line 996 of file attrbev.cpp.

00997 {
00998 #ifdef _DEBUG
00999     NodeAttribute::GetDebugDetails( Str );
01000 
01001     String_256 TempStr;
01002     TempStr._MakeMsg( TEXT("\r\nValue=#1%d\r\n"), Value.m_Contrast );
01003     (*Str)+= TempStr;
01004 #else
01005     if (Str)
01006     {
01007         *Str = wxT("");
01008     }
01009 #endif
01010 }

UINT32 AttrBevelContrast::GetNodeSize  )  const [virtual]
 

For finding the size of the node.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/10/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
The size of the node in bytes
See also:
Node::GetSubtreeSize

Reimplemented from Node.

Definition at line 1028 of file attrbev.cpp.

01029 {     
01030     return (sizeof(AttrBevelContrast)); 
01031 }  

INT32 AttrBevelContrast::operator== const NodeAttribute Attrib  )  [virtual]
 

A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/2/94
Parameters:
Atrib,: The attribute to compare, which must be an AttrBevelContrast [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: An ENSURE failure will occur if Attrib does not have a AttrBevelContrast runtime class.

See also:
NodeAttribute::operator==

Reimplemented from NodeAttribute.

Definition at line 847 of file attrbev.cpp.

00848 {
00849     ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrBevelContrast)), 
00850         "Trying to compare two objects with different types"); 
00851     AttrBevelContrast * Attr = (AttrBevelContrast *) &Attrib;
00852     return (Attr->Value.m_Contrast == Value.m_Contrast); 
00853 } 

void AttrBevelContrast::PolyCopyNodeContents NodeRenderable pNodeCopy  )  [virtual]
 

Polymorphically copies the contents of this node to another.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/12/2003
Parameters:
- [OUTPUTS]
Returns:
Errors: An assertion failure will occur if NodeCopy is NULL Scope: protected

Reimplemented from NodeRenderable.

Definition at line 915 of file attrbev.cpp.

00916 {
00917     ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node");
00918     ENSURE(IS_A(pNodeCopy, AttrBevelContrast), "PolyCopyNodeContents given wrong dest node type");
00919 
00920     if (IS_A(pNodeCopy, AttrBevelContrast))
00921         CopyNodeContents((AttrBevelContrast*)pNodeCopy);
00922 }

void AttrBevelContrast::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Line Width attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from NodeAttribute.

Definition at line 779 of file attrbev.cpp.

00780 {
00781 }

void AttrBevelContrast::SetValue INT32  NewValue  )  [inline]
 

Definition at line 390 of file attrbev.h.

00390 { Value.m_Contrast = NewValue; }

void AttrBevelContrast::ShowDebugTreeDetails  )  const
 

Displays debugging info of the tree.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/6/93

Definition at line 986 of file attrbev.cpp.

00987 {
00988     // Display a bit of debugging info
00989     // For now, we will just call the base class version
00990 #ifdef _DEBUG
00991     NodeAttribute::ShowDebugTreeDetails();  
00992 #endif
00993 }

Node * AttrBevelContrast::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:
21/6/93
Parameters:
- [INPUTS]
[OUTPUTS] 
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 819 of file attrbev.cpp.

00820 {
00821     AttrBevelContrast* NodeCopy = new AttrBevelContrast();
00822     ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 
00823     CopyNodeContents(NodeCopy);
00824     NodeCopy->Value.m_Contrast = Value.m_Contrast;
00825     return NodeCopy;
00826 } 

void AttrBevelContrast::Transform TransformBase Trans  )  [virtual]
 

Scale the Line Width.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/8/94
Parameters:
Trans - the transform object to apply to this attribute. [INPUTS]
See also:
NodeRenderable::Transform

Reimplemented from NodeRenderable.

Definition at line 795 of file attrbev.cpp.

00796 {
00797     
00798 }

BOOL AttrBevelContrast::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 1054 of file attrbev.cpp.

01055 {
01056 #ifdef DO_EXPORT
01057     return WritePreChildrenWeb(pFilter);
01058 #else
01059     return FALSE;
01060 #endif
01061 }

BOOL AttrBevelContrast::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the line width record to the filter.

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

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/5/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 1046 of file attrbev.cpp.

01047 {
01048     return TRUE;
01049 }


Member Data Documentation

BevelAttributeValueContrast AttrBevelContrast::Value
 

Definition at line 399 of file attrbev.h.


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