#include <fillattr2.h>
Inheritance diagram for AttrFourColTranspFill:
Public Member Functions | |
AttrFourColTranspFill () | |
AttrFourColTranspFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
void | Render (RenderRegion *pRender) |
'Renders' a FourCol 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 to determine whether transparency is needed to render properly. | |
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 FourCol transparent fill record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Writes the FourCol transparent fill record to the filter. | |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
FourColTranspFillAttribute | Value |
Definition at line 1739 of file fillattr2.h.
|
Definition at line 1744 of file fillattr2.h. 01744 : AttrFourColFill() {}
|
|
Definition at line 1745 of file fillattr2.h. 01750 : 01751 AttrFourColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
|
|
Reimplemented from AttrFillGeometry. Definition at line 1767 of file fillattr2.h. 01767 { return ChangeTransp(pValue); }
|
|
Reimplemented from NodeAttribute. Definition at line 1764 of file fillattr2.h. 01764 { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
|
|
Implements AttrFourColFill. Definition at line 1765 of file fillattr2.h. 01765 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 13597 of file fillattr.cpp. 13598 { 13599 return (_R(IDS_FOURCOLTRANSPFILL)); 13600 }
|
|
Output details of this attribute to the Camelot debug tree dialog.
Reimplemented from NodeRenderable. Definition at line 13615 of file fillattr.cpp. 13616 { 13617 #ifdef _DEBUG 13618 NodeAttribute::GetDebugDetails( Str ); 13619 13620 String_256 TempStr; 13621 13622 TempStr._MakeMsg( TEXT("\r\nFourCol Graduated Fill:\r\n")); 13623 (*Str) += TempStr; 13624 13625 TempStr._MakeMsg(TEXT("\r\nStart")); 13626 (*Str) += TempStr; 13627 13628 TempStr._MakeMsg(TEXT("\r\nEnd")); 13629 (*Str) += TempStr; 13630 13631 TempStr._MakeMsg(TEXT("\r\nStart = (#1%ld, #2%ld)"), 13632 (*GetStartPoint()).x, (*GetStartPoint()).y); 13633 (*Str) += TempStr; 13634 13635 TempStr._MakeMsg(TEXT("\r\nEnd = (#1%ld, #2%ld) "), 13636 (*GetEndPoint()).x, (*GetEndPoint()).y); 13637 (*Str) += TempStr; 13638 13639 TempStr._MakeMsg(TEXT("\r\n3rd = (#1%ld, #2%ld) "), 13640 (*GetEndPoint2()).x, (*GetEndPoint2()).y); 13641 (*Str) += TempStr; 13642 #endif 13643 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 13659 of file fillattr.cpp. 13660 { 13661 return sizeof(AttrFourColTranspFill); 13662 }
|
|
Determine whether this attribute has the default value or not.
Reimplemented from NodeAttribute. Definition at line 13754 of file fillattr.cpp. 13755 { 13756 // Slight bodge - we will assume that the default transparency is fully opaque 13757 if (bAppearance) 13758 return (Value.TranspType==TT_NoTranspType || (Value.TranspType==TT_Mix && Value.Transp == 0 && Value.EndTransp==0 && Value.EndTransp2==0 && Value.EndTransp3==0)); 13759 else 13760 return FALSE; 13761 }
|
|
Virtual function for determining if the node is an attribute.
Reimplemented from NodeAttribute. Definition at line 1769 of file fillattr2.h. 01769 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 1779 of file fillattr2.h. 01779 { 01780 return ((GetStartTransp() != NULL && *GetStartTransp() != 0) || 01781 (GetEndTransp() != NULL && *GetEndTransp() != 0) || 01782 (GetEndTransp2() != NULL && *GetEndTransp2() != 0) || 01783 (GetEndTransp3() != NULL && *GetEndTransp3() != 0)); 01784 }
|
|
Reimplemented from AttrFillGeometry. Definition at line 1761 of file fillattr2.h. 01761 { return IsTranspMeshVisible(); }
|
|
Called to determine whether transparency is needed to render properly.
Reimplemented from AttrFillGeometry. Definition at line 13496 of file fillattr.cpp. 13497 { 13498 AttrFourColTranspFill* pNonConst = (AttrFourColTranspFill*) this; 13499 return ( pNonConst->GetTranspType() != TT_Mix || 13500 *(pNonConst->GetStartTransp()) != 0 || 13501 *(pNonConst->GetEndTransp()) != 0 || 13502 *(pNonConst->GetEndTransp2()) != 0 || 13503 *(pNonConst->GetEndTransp3()) != 0 ); 13504 }
|
|
'Renders' a FourCol Fill Colour attribute.
Reimplemented from NodeAttribute. Definition at line 13476 of file fillattr.cpp. 13477 { 13478 pRender->SetTranspFillGeometry(&Value, FALSE); 13479 }
|
|
Renders the grad fills arrow blob when requested to by its selected parent.
Reimplemented from AttrFourColFill. Definition at line 13547 of file fillattr.cpp. 13548 { 13549 #if !defined(EXCLUDE_FROM_RALPH) 13550 if (!IsVisible()) 13551 return; // We're in Fill Transparency Mode 13552 13553 // Don't bother if this fill is being edited as a copy of it 13554 // we be rendered thoughout the drag op 13555 if (IsFillBeingEdited()) 13556 return; 13557 13558 // Ignore this if the mesh is the same as the last one rendered. 13559 if (CheckPreviousFillMesh()) 13560 return; 13561 13562 // Get the control points 13563 DocCoord StartPoint = *GetStartPoint(); 13564 DocCoord EndPoint = *GetEndPoint(); 13565 DocCoord EndPoint2 = *GetEndPoint2(); 13566 DocCoord EndPoint3 = EndPoint2 + EndPoint - StartPoint; 13567 13568 DocCoord ControlPoints[4]; 13569 ControlPoints[FILLCONTROL_STARTPOINT] = StartPoint; 13570 ControlPoints[FILLCONTROL_ENDPOINT] = EndPoint; 13571 ControlPoints[FILLCONTROL_ENDPOINT2] = EndPoint2; 13572 ControlPoints[FILLCONTROL_ENDPOINT3] = EndPoint3; 13573 13574 // Render a nice pretty Fill Mesh thingy 13575 RenderFillMesh(pRender, ControlPoints, SelectionState, 4); 13576 13577 // This call was removed by Gerry (2/9/96) as it causes blob problems 13578 // If we are removing blobs then force all blobs to be deselected 13579 // if ((Camelot.GetBlobManager())->IsRemovingBlobs()) 13580 // DeselectAllNoRedraw(); 13581 #endif 13582 }
|
|
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 13523 of file fillattr.cpp. 13524 { 13525 AttrFourColTranspFill* NodeCopy = new AttrFourColTranspFill(); 13526 if (NodeCopy == NULL) 13527 return NULL; 13528 13529 CopyNodeContents(NodeCopy); 13530 13531 return NodeCopy; 13532 }
|
|
Writes the FourCol transparent fill record to the filter. > virtual BOOL AttrFourColTranspFill::WritePreChildrenNative(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 13728 of file fillattr.cpp. 13729 { 13730 #ifdef DO_EXPORT 13731 return WritePreChildrenWeb(pFilter); 13732 #else 13733 return FALSE; 13734 #endif 13735 }
|
|
Writes the FourCol transparent fill record to the filter. > virtual BOOL AttrFourColTranspFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 13679 of file fillattr.cpp. 13680 { 13681 #ifdef DO_EXPORT 13682 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 13683 ERROR3IF(Value.Transp > 255,"Start transparency level is too high to be stored as a byte"); 13684 ERROR3IF(Value.EndTransp > 255,"End transparency level is too high to be stored as a byte"); 13685 ERROR3IF(Value.EndTransp2 > 255,"End transparency2 level is too high to be stored as a byte"); 13686 ERROR3IF(Value.EndTransp3 > 255,"End transparency3 level is too high to be stored as a byte"); 13687 ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte"); 13688 13689 BOOL ok = TRUE; 13690 13691 CamelotFileRecord Rec(pFilter,TAG_FOURCOLTRANSPARENTFILL,TAG_FOURCOLTRANSPARENTFILL_SIZE); 13692 13693 if (ok) ok = Rec.Init(); 13694 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 13695 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 13696 if (ok) ok = Rec.WriteCoord(Value.EndPoint2); 13697 if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp)); 13698 if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp)); 13699 if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp2)); 13700 if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp3)); 13701 if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType)); 13702 if (ok) ok = pFilter->Write(&Rec); 13703 13704 if (!ok) 13705 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 13706 13707 return ok; 13708 #else 13709 return FALSE; 13710 #endif 13711 }
|
|
Definition at line 1787 of file fillattr2.h. |