AttrConicalTranspFill Class Reference

Conical Graduated Transparency Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrConicalTranspFill:

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

Public Member Functions

 AttrConicalTranspFill ()
 AttrConicalTranspFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a Conical 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 BOOL IsVisible ()
virtual BOOL NeedsTransparency () const
 Called.
virtual CCRuntimeClassGetAttributeType ()
virtual AttributeValueGetAttributeValue ()
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 conical transparent fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL IsSeeThrough (BOOL CheckIndirectAttrs)

Protected Attributes

ConicalTranspFillAttribute Value

Detailed Description

Conical Graduated Transparency Fill Attribute class.

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

Definition at line 1207 of file fillattr2.h.


Constructor & Destructor Documentation

AttrConicalTranspFill::AttrConicalTranspFill  )  [inline]
 

Definition at line 1212 of file fillattr2.h.

01212 : AttrConicalFill() {}

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

Definition at line 1213 of file fillattr2.h.

01218                                      : 
01219         AttrConicalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

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

Reimplemented from AttrFillGeometry.

Definition at line 1234 of file fillattr2.h.

01234 { return ChangeTransp(pValue); }

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

Reimplemented from NodeAttribute.

Definition at line 1231 of file fillattr2.h.

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

Implements AttrConicalFill.

Definition at line 1232 of file fillattr2.h.

01232 { return &Value; }

UINT32 AttrConicalTranspFill::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 9658 of file fillattr.cpp.

09659 {
09660     return (_R(IDS_CONICALTRANSPFILL)); 
09661 }                                  

void AttrConicalTranspFill::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 9674 of file fillattr.cpp.

09675 {
09676 #ifdef _DEBUG
09677     NodeAttribute::GetDebugDetails( Str );
09678 
09679     String_256 TempStr;
09680 
09681     TempStr._MakeMsg( TEXT("\r\nConical Graduated Fill:\r\n"));
09682     (*Str) += TempStr;
09683 
09684     TempStr._MakeMsg(TEXT("\r\nStart"));
09685     (*Str) += TempStr;
09686 
09687     TempStr._MakeMsg(TEXT("\r\nEnd"));
09688     (*Str) += TempStr;
09689 
09690     TempStr._MakeMsg(TEXT("\r\nStart point =(#1%ld, #2%ld)"), 
09691                      (*GetStartPoint()).x, (*GetStartPoint()).y);
09692     (*Str) += TempStr;
09693 
09694     TempStr._MakeMsg(TEXT("\r\nEnd point =(#1%ld, #2%ld), "), 
09695                      (*GetEndPoint()).x, (*GetEndPoint()).y);
09696     (*Str) += TempStr;
09697 #endif
09698 }

UINT32 AttrConicalTranspFill::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 9712 of file fillattr.cpp.

09713 {     
09714     return sizeof(AttrConicalTranspFill);
09715 }  

BOOL AttrConicalTranspFill::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 9792 of file fillattr.cpp.

09793 {
09794     // Slight bodge - we will assume that the default transparency is fully opaque
09795     if (bAppearance)
09796         return (Value.TranspType==TT_NoTranspType || (Value.TranspType==TT_Mix && Value.Transp == 0 && Value.EndTransp==0));
09797     else
09798         return FALSE;
09799 }

virtual BOOL AttrConicalTranspFill::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 1236 of file fillattr2.h.

01236 { return TRUE; } 

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

Reimplemented from NodeAttribute.

Definition at line 1246 of file fillattr2.h.

01246                                                        {
01247         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01248                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
01249     }

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

Reimplemented from AttrFillGeometry.

Definition at line 1228 of file fillattr2.h.

01228 { return IsTranspMeshVisible(); }

BOOL AttrConicalTranspFill::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 20164 of file fillattr.cpp.

20165 {
20166     AttrConicalTranspFill* pNonConst = (AttrConicalTranspFill*) this;
20167     return (    pNonConst->GetTranspType()      != TT_Mix ||
20168                 *(pNonConst->GetStartTransp())  != 0 ||
20169                 *(pNonConst->GetEndTransp())    != 0 );
20170 }

void AttrConicalTranspFill::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Conical Fill Colour attribute.

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

Reimplemented from NodeAttribute.

Definition at line 9616 of file fillattr.cpp.

09617 {
09618     pRender->SetTranspFillGeometry(&Value, FALSE);
09619 }

void AttrConicalTranspFill::RenderFillBlobs RenderRegion pRender  )  [virtual]
 

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

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/6/94
Parameters:
pRender - The region to render the blobs to. [INPUTS]

Reimplemented from AttrConicalFill.

Definition at line 9287 of file fillattr.cpp.

09288 {
09289 #if !defined(EXCLUDE_FROM_RALPH)
09290     if (!IsVisible())
09291         return;     // We're Not in Fill Transparency Mode
09292 
09293     // Don't bother if this fill is being edited as a copy of it
09294     // we be rendered thoughout the drag op
09295     if (IsFillBeingEdited())
09296         return;
09297 
09298     // Ignore this if the mesh is the same as the last one rendered.
09299     if (CheckPreviousFillMesh())
09300         return;
09301 
09302     DocCoord ControlPoints[2];
09303     ControlPoints[0] = (*GetStartPoint());
09304     ControlPoints[1] = (*GetEndPoint());
09305 
09306     // Render a nice pretty Fill Mesh thingy
09307     RenderFillMesh(pRender, ControlPoints, SelectionState, 2);
09308 
09309     // This call was removed by Gerry (2/9/96) as it causes blob problems
09310     // If we are removing blobs then force all blobs to be deselected
09311 //  if ((Camelot.GetBlobManager())->IsRemovingBlobs())
09312 //      DeselectAllNoRedraw();
09313 #endif
09314 }

Node * AttrConicalTranspFill::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 9636 of file fillattr.cpp.

09637 {
09638     AttrConicalTranspFill* NodeCopy = new AttrConicalTranspFill();
09639     if (NodeCopy == NULL)
09640         return NULL;
09641 
09642     CopyNodeContents(NodeCopy);
09643     
09644     return NodeCopy;
09645 }  

BOOL AttrConicalTranspFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 9767 of file fillattr.cpp.

09768 {
09769 #ifdef DO_EXPORT
09770     return WritePreChildrenWeb(pFilter);
09771 #else
09772     return FALSE;
09773 #endif
09774 }

BOOL AttrConicalTranspFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the conical transparent fill record to the filter.

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

09734 {
09735 #ifdef DO_EXPORT
09736     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
09737     ERROR3IF(Value.Transp     > 255,"Start transparency level is too high to be stored as a byte");
09738     ERROR3IF(Value.EndTransp  > 255,"End transparency level is too high to be stored as a byte");
09739     ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte");
09740 
09741     BOOL ok = TRUE;
09742 
09743     CamelotFileRecord Rec(pFilter,TAG_CONICALTRANSPARENTFILL,TAG_CONICALTRANSPARENTFILL_SIZE);
09744 
09745     if (ok) ok = Rec.Init();
09746     if (ok) ok = Rec.WriteCoord(Value.StartPoint);
09747     if (ok) ok = Rec.WriteCoord(Value.EndPoint);
09748     if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp));
09749     if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp));
09750     if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType));
09751     if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ());
09752     if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ());
09753     if (ok) ok = pFilter->Write(&Rec);
09754 
09755     if (!ok)
09756         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
09757 
09758     return ok;
09759 #else
09760     return FALSE;
09761 #endif
09762 }


Member Data Documentation

ConicalTranspFillAttribute AttrConicalTranspFill::Value [protected]
 

Definition at line 1252 of file fillattr2.h.


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