AttrRadialTranspFill Class Reference

Radial Graduated Transp Fill Attribute class. More...

#include <fillattr2.h>

Inheritance diagram for AttrRadialTranspFill:

AttrRadialFill AttrFillGeometry NodeAttribute NodeRenderable Node CCObject SimpleCCObject AttrCircularTranspFill List of all members.

Public Member Functions

 AttrRadialTranspFill ()
 AttrRadialTranspFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE)
void Render (RenderRegion *pRender)
 'Renders' a Radial Fill Colour attribute.
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.
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 NeedsToRenderAtEachBrushStroke () const
 So that don't have to keep re-rendering attributes whilst drawing a brush, this identifies whether or not the attribute need to be rendered at each step, e.g. radial fills.
virtual BOOL HasEquivalentDefaultValue (BOOL bAppearance=FALSE)
 Determine whether this attribute has the default value or not.
virtual BOOL WritePreChildrenWeb (BaseCamelotFilter *pFilter)
 Writes the radial transparent fill record to the filter.
virtual BOOL WritePreChildrenNative (BaseCamelotFilter *pFilter)
virtual BOOL IsSeeThrough (BOOL CheckIndirectAttrs)

Protected Attributes

RadialTranspFillAttribute Value

Detailed Description

Radial Graduated Transp Fill Attribute class.

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

Definition at line 989 of file fillattr2.h.


Constructor & Destructor Documentation

AttrRadialTranspFill::AttrRadialTranspFill  )  [inline]
 

Definition at line 994 of file fillattr2.h.

00994 : AttrRadialFill() {}

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

Definition at line 995 of file fillattr2.h.

01000                                      : 
01001         AttrRadialFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}


Member Function Documentation

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

Reimplemented from AttrFillGeometry.

Definition at line 1016 of file fillattr2.h.

01016 { return ChangeTransp(pValue); }

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

Reimplemented from NodeAttribute.

Definition at line 1013 of file fillattr2.h.

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

Implements AttrRadialFill.

Definition at line 1014 of file fillattr2.h.

01014 { return &Value; }

UINT32 AttrRadialTranspFill::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 8246 of file fillattr.cpp.

08247 {
08248     if (!IsATranspFill ())
08249     {
08250         if (IsElliptical ())
08251         {
08252             return (_R(IDS_LINEARGRADFILL)); 
08253         }
08254         else
08255         {
08256             return (_R(IDS_CIRCULARGRADFILL));
08257         }
08258     }
08259     else
08260     {
08261         if (IsElliptical ())
08262         {
08263             return (_R(IDS_ELLIPITICALTRANSPFILL)); 
08264         }
08265         else
08266         {
08267             return (_R(IDS_CIRCULARTRANSPFILL));
08268         }
08269     }
08270 }                                  

void AttrRadialTranspFill::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 8283 of file fillattr.cpp.

08284 {
08285 #ifdef _DEBUG
08286     NodeAttribute::GetDebugDetails( Str );
08287 
08288     String_256 TempStr;
08289 
08290     TempStr._MakeMsg( TEXT("\r\nRadial Graduated Fill:\r\n"));
08291     (*Str) += TempStr;
08292 
08293     TempStr._MakeMsg(TEXT("\r\nStart"));
08294     (*Str) += TempStr;
08295 
08296     TempStr._MakeMsg(TEXT("\r\nEnd"));
08297     (*Str) += TempStr;
08298 
08299     TempStr._MakeMsg(TEXT("\r\nStart point =(#1%ld, #2%ld)"), 
08300                      (*GetStartPoint()).x, (*GetStartPoint()).y);
08301     (*Str) += TempStr;
08302 
08303     TempStr._MakeMsg(TEXT("\r\nEnd point =(#1%ld, #2%ld), "), 
08304                      (*GetEndPoint()).x, (*GetEndPoint()).y);
08305     (*Str) += TempStr;
08306 
08307     TempStr._MakeMsg(TEXT("\r\nEnd point2 = (#1%ld, #2%ld) "), 
08308                      (*GetEndPoint2()).x, (*GetEndPoint2()).y);
08309     (*Str) += TempStr;
08310 #endif
08311 }

UINT32 AttrRadialTranspFill::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 8325 of file fillattr.cpp.

08326 {     
08327     return sizeof(AttrRadialTranspFill);
08328 }  

BOOL AttrRadialTranspFill::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 8423 of file fillattr.cpp.

08424 {
08425     // Slight bodge - we will assume that the default transparency is fully opaque
08426     if (bAppearance)
08427         return (Value.TranspType==TT_NoTranspType || (Value.TranspType==TT_Mix && Value.Transp == 0 && Value.EndTransp==0));
08428     else
08429         return FALSE;
08430 }

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

01018 { return TRUE; } 

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

Reimplemented from NodeAttribute.

Definition at line 1029 of file fillattr2.h.

01029                                                        {
01030         return ((GetStartTransp() != NULL   &&  *GetStartTransp() != 0) ||
01031                 (GetEndTransp() != NULL     &&  *GetEndTransp() != 0));
01032     }

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

Reimplemented from AttrFillGeometry.

Definition at line 1010 of file fillattr2.h.

01010 { return IsTranspMeshVisible(); }

BOOL AttrRadialTranspFill::NeedsToRenderAtEachBrushStroke  )  const [virtual]
 

So that don't have to keep re-rendering attributes whilst drawing a brush, this identifies whether or not the attribute need to be rendered at each step, e.g. radial fills.

Author:
Diccon_Yamanaka (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/11/99
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if this attribute should be rendered at every step of a brush stroke

Errors: See Also; Brush code (ndbrshmk.cpp)

Reimplemented from AttrRadialFill.

Definition at line 8348 of file fillattr.cpp.

08349 {
08350     return TRUE;
08351 }

BOOL AttrRadialTranspFill::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 20141 of file fillattr.cpp.

20142 {
20143     AttrRadialTranspFill* pNonConst = (AttrRadialTranspFill*) this;
20144     return (    pNonConst->GetTranspType()      != TT_Mix ||
20145                 *(pNonConst->GetStartTransp())  != 0 ||
20146                 *(pNonConst->GetEndTransp())    != 0 );
20147 }

void AttrRadialTranspFill::Render RenderRegion pRender  )  [virtual]
 

'Renders' a Radial Fill Colour attribute.

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

Reimplemented from NodeAttribute.

Definition at line 8204 of file fillattr.cpp.

08205 {
08206     pRender->SetTranspFillGeometry(&Value, FALSE);
08207 }

void AttrRadialTranspFill::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 AttrRadialFill.

Definition at line 7791 of file fillattr.cpp.

07792 {
07793 #if !defined(EXCLUDE_FROM_RALPH)
07794     if (!IsVisible())
07795         return;     // We're Not in Fill Transparency Mode
07796 
07797     // Don't bother if this fill is being edited as a copy of it
07798     // we be rendered thoughout the drag op
07799     if (IsFillBeingEdited())
07800         return;
07801 
07802     // Ignore this if the mesh is the same as the last one rendered.
07803     if (CheckPreviousFillMesh())
07804         return;
07805 
07806     DocCoord ControlPoints[5];
07807     ControlPoints[FILLCONTROL_STARTPOINT] = (*GetStartPoint());
07808     ControlPoints[FILLCONTROL_ENDPOINT] = (*GetEndPoint());
07809     ControlPoints[FILLCONTROL_SECONDARYPOINT] = (*GetEndPoint2());
07810 
07811     // Render a nice pretty Fill Mesh thingy
07812     RenderFillMesh(pRender, ControlPoints, SelectionState, 5);
07813 
07814     // This call was removed by Gerry (2/9/96) as it causes blob problems
07815     // If we are removing blobs then force all blobs to be deselected
07816 //  if ((Camelot.GetBlobManager())->IsRemovingBlobs())
07817 //      DeselectAllNoRedraw();
07818 #endif
07819 }

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

08225 {
08226     AttrRadialTranspFill* NodeCopy = new AttrRadialTranspFill();
08227     if (NodeCopy == NULL)
08228         return NULL;
08229 
08230     CopyNodeContents(NodeCopy);
08231     
08232     return NodeCopy;
08233 }  

BOOL AttrRadialTranspFill::WritePreChildrenNative BaseCamelotFilter pFilter  )  [virtual]
 

Reimplemented from Node.

Definition at line 8438 of file fillattr.cpp.

08439 {
08440 #ifdef DO_EXPORT
08441     return WritePreChildrenWeb(pFilter);
08442 #else
08443     return FALSE;
08444 #endif
08445 }

BOOL AttrRadialTranspFill::WritePreChildrenWeb BaseCamelotFilter pFilter  )  [virtual]
 

Writes the radial transparent fill record to the filter.

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

08367 {
08368 #ifdef DO_EXPORT
08369     ERROR2IF(pFilter == NULL,FALSE,"NULL filter param");
08370     ERROR3IF(Value.Transp     > 255,"Start transparency level is too high to be stored as a byte");
08371     ERROR3IF(Value.EndTransp  > 255,"End transparency level is too high to be stored as a byte");
08372     ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte");
08373 
08374     BOOL ok = TRUE;
08375 
08376     UINT32 Tag = TAG_CIRCULARTRANSPARENTFILL, TagSize = TAG_CIRCULARTRANSPARENTFILL_SIZE;
08377 
08378     if (IsElliptical())
08379     {
08380         Tag     = TAG_ELLIPTICALTRANSPARENTFILL;
08381         TagSize = TAG_ELLIPTICALTRANSPARENTFILL_SIZE;
08382     }
08383 
08384     CamelotFileRecord Rec(pFilter,Tag,TagSize);
08385 
08386     if (ok) ok = Rec.Init();
08387     if (ok) ok = Rec.WriteCoord(Value.StartPoint);
08388     if (ok) ok = Rec.WriteCoord(Value.EndPoint);
08389 
08390     if (ok && IsElliptical())
08391         if (ok) ok = Rec.WriteCoord(Value.EndPoint2);
08392 
08393     if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp));
08394     if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp));
08395     if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType));
08396     if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ());
08397     if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ());
08398     if (ok) ok = pFilter->Write(&Rec);
08399 
08400     if (!ok)
08401         pFilter->GotError(_R(IDE_FILE_WRITE_ERROR));
08402 
08403     return ok;
08404 #else
08405     return FALSE;
08406 #endif
08407 }


Member Data Documentation

RadialTranspFillAttribute AttrRadialTranspFill::Value [protected]
 

Definition at line 1035 of file fillattr2.h.


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