#include <fillattr2.h>
Inheritance diagram for AttrLinearTranspFill:
Public Member Functions | |
AttrLinearTranspFill () | |
AttrLinearTranspFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
void | Render (RenderRegion *pRender) |
'Renders' a Linear Fill Colour attribute. | |
Node * | SimpleCopy () |
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 CCRuntimeClass * | GetAttributeType () |
virtual AttributeValue * | GetAttributeValue () |
AttrFillGeometry * | ChangeAttrValue (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 linear transparent fill record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
LinearTranspFillAttribute | Value |
Definition at line 808 of file fillattr2.h.
|
Definition at line 813 of file fillattr2.h. 00813 : AttrLinearFill() {}
|
|
Definition at line 814 of file fillattr2.h. 00819 : 00820 AttrLinearFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
|
|
Reimplemented from AttrFillGeometry. Definition at line 835 of file fillattr2.h. 00835 { return ChangeTransp(pValue); }
|
|
Reimplemented from NodeAttribute. Definition at line 832 of file fillattr2.h. 00832 { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
|
|
Implements AttrLinearFill. Definition at line 833 of file fillattr2.h. 00833 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 6970 of file fillattr.cpp. 06971 { 06972 return (_R(IDS_LINEARTRANSPFILL)); 06973 }
|
|
Output details of this attribute to the Camelot debug tree dialog.
Reimplemented from NodeRenderable. Definition at line 6986 of file fillattr.cpp. 06987 { 06988 #ifdef _DEBUG 06989 NodeAttribute::GetDebugDetails( Str ); 06990 06991 String_256 TempStr; 06992 06993 TempStr._MakeMsg( TEXT("\r\nLinear Graduated Transp:\r\n")); 06994 (*Str) += TempStr; 06995 06996 TempStr._MakeMsg(TEXT("\r\nStart = #1%u"), *GetStartTransp() ); 06997 (*Str) += TempStr; 06998 06999 TempStr._MakeMsg(TEXT("\r\nEnd = #1%u"), *GetEndTransp() ); 07000 (*Str) += TempStr; 07001 07002 TempStr._MakeMsg(TEXT("\r\nStart point =(#1%ld, #2%ld)"), 07003 (*GetStartPoint()).x, (*GetStartPoint()).y); 07004 (*Str) += TempStr; 07005 07006 TempStr._MakeMsg(TEXT("\r\nEnd point =(#1%ld, #2%ld), "), 07007 (*GetEndPoint()).x, (*GetEndPoint()).y); 07008 (*Str) += TempStr; 07009 #endif 07010 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 7025 of file fillattr.cpp. 07026 { 07027 return sizeof(AttrLinearTranspFill); 07028 }
|
|
Determine whether this attribute has the default value or not.
Reimplemented from NodeAttribute. Definition at line 7116 of file fillattr.cpp. 07117 { 07118 // Slight bodge - we will assume that the default transparency is fully opaque 07119 if (bAppearance) 07120 return (Value.TranspType==TT_NoTranspType || (Value.TranspType==TT_Mix && Value.Transp == 0 && Value.EndTransp==0)); 07121 else 07122 return FALSE; 07123 }
|
|
Virtual function for determining if the node is an attribute.
Reimplemented from NodeAttribute. Definition at line 837 of file fillattr2.h. 00837 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 847 of file fillattr2.h. 00847 { 00848 return ((GetStartTransp() != NULL && *GetStartTransp() != 0) || 00849 (GetEndTransp() != NULL && *GetEndTransp() != 0)); 00850 }
|
|
Reimplemented from AttrFillGeometry. Definition at line 829 of file fillattr2.h. 00829 { return IsTranspMeshVisible(); }
|
|
Called.
Reimplemented from AttrFillGeometry. Definition at line 20118 of file fillattr.cpp. 20119 { 20120 AttrLinearTranspFill* pNonConst = (AttrLinearTranspFill*) this; 20121 return ( pNonConst->GetTranspType() != TT_Mix || 20122 *(pNonConst->GetStartTransp()) != 0 || 20123 *(pNonConst->GetEndTransp()) != 0 ); 20124 }
|
|
'Renders' a Linear Fill Colour attribute.
Reimplemented from NodeAttribute. Definition at line 6928 of file fillattr.cpp. 06929 { 06930 pRender->SetTranspFillGeometry(&Value, FALSE); 06931 }
|
|
Renders the grad fills arrow blob when requested to by its selected parent.
Reimplemented from AttrLinearFill. Definition at line 6506 of file fillattr.cpp. 06507 { 06508 #if !defined(EXCLUDE_FROM_RALPH) 06509 if (!IsVisible()) 06510 return; // We're Not in Fill Transparency Mode 06511 06512 // Don't bother if this fill is being edited as a copy of it 06513 // we be rendered thoughout the drag op 06514 if (IsFillBeingEdited()) 06515 return; 06516 06517 // Ignore this if the mesh is the same as the last one rendered. 06518 if (CheckPreviousFillMesh()) 06519 return; 06520 06521 DocCoord ControlPoints[2]; 06522 ControlPoints[0] = (*GetStartPoint()); 06523 ControlPoints[1] = (*GetEndPoint()); 06524 06525 // Render a nice pretty Fill Mesh thingy 06526 RenderFillMesh(pRender, ControlPoints, SelectionState, 2); 06527 06528 // This call was removed by Gerry (2/9/96) as it causes blob problems 06529 // If we are removing blobs then force all blobs to be deselected 06530 // if ((Camelot.GetBlobManager())->IsRemovingBlobs()) 06531 // DeselectAllNoRedraw(); 06532 #endif 06533 }
|
|
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.
Reimplemented from NodeAttribute. Definition at line 6948 of file fillattr.cpp. 06949 { 06950 AttrLinearTranspFill* NodeCopy = new AttrLinearTranspFill(); 06951 if (NodeCopy == NULL) 06952 return NULL; 06953 06954 CopyNodeContents(NodeCopy); 06955 06956 return NodeCopy; 06957 }
|
|
Reimplemented from Node. Definition at line 7092 of file fillattr.cpp. 07093 { 07094 #ifdef DO_EXPORT 07095 return WritePreChildrenWeb(pFilter); 07096 #else 07097 return FALSE; 07098 #endif 07099 }
|
|
Writes the linear transparent fill record to the filter. > virtual BOOL AttrLinearTranspFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 7045 of file fillattr.cpp. 07046 { 07047 #ifdef DO_EXPORT 07048 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 07049 ERROR3IF(Value.Transp > 255,"Start transparency level is too high to be stored as a byte"); 07050 ERROR3IF(Value.EndTransp > 255,"End transparency level is too high to be stored as a byte"); 07051 ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte"); 07052 07053 BOOL ok = TRUE; 07054 07055 // If the linear fill points are not perpendicular then we must write 07056 // a new 3-point linear fill record... 07057 BOOL b3PointLinear = (!AreLinesPerpendicular(GetStartPoint(), GetEndPoint(), GetEndPoint2())); 07058 07059 INT32 tag = TAG_LINEARTRANSPARENTFILL; 07060 UINT32 size = TAG_LINEARTRANSPARENTFILL_SIZE; 07061 if (b3PointLinear) 07062 { 07063 tag = TAG_LINEARTRANSPARENTFILL3POINT; 07064 size = TAG_LINEARTRANSPARENTFILL3POINT_SIZE; 07065 } 07066 07067 CamelotFileRecord Rec(pFilter, tag, size); 07068 07069 if (ok) ok = Rec.Init(); 07070 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 07071 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 07072 if (ok && b3PointLinear) ok = Rec.WriteCoord(Value.EndPoint2); 07073 if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp)); 07074 if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp)); 07075 if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType)); 07076 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ()); 07077 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ()); 07078 if (ok) ok = pFilter->Write(&Rec); 07079 07080 if (!ok) 07081 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 07082 07083 return ok; 07084 #else 07085 return FALSE; 07086 #endif 07087 }
|
|
Definition at line 853 of file fillattr2.h. |