#include <fillattr2.h>
Inheritance diagram for AttrSquareColourFill:
Public Member Functions | |
AttrSquareColourFill () | |
AttrSquareColourFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
void | Render (RenderRegion *pRender) |
'Renders' a Square 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 CCRuntimeClass * | GetAttributeType () |
virtual AttributeValue * | GetAttributeValue () |
AttrFillGeometry * | ChangeAttrValue (AttrValueChange *pValue) |
virtual BOOL | IsAColourFill () const |
Virtual function for determining if the node is a Colour Fill attribute. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the Square fill record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Writes the Square fill record to the filter. | |
virtual BOOL | WriteColourDefinitions (BaseCamelotFilter *pFilter) |
Writes out colour definitions for this fill. | |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
SquareFillAttribute | Value |
Definition at line 1317 of file fillattr2.h.
|
Definition at line 1322 of file fillattr2.h. 01322 : AttrSquareFill() {}
|
|
Definition at line 1323 of file fillattr2.h. 01328 : 01329 AttrSquareFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
|
|
Reimplemented from AttrFillGeometry. Definition at line 1342 of file fillattr2.h. 01342 { return ChangeColour(pValue); }
|
|
Reimplemented from NodeAttribute. Definition at line 1339 of file fillattr2.h. 01339 { return CC_RUNTIME_CLASS(AttrFillGeometry); }
|
|
Implements AttrSquareFill. Definition at line 1340 of file fillattr2.h. 01340 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 10486 of file fillattr.cpp. 10487 { 10488 return (_R(IDS_SQUAREGRADFILL)); 10489 }
|
|
Output details of this attribute to the Camelot debug tree dialog.
Reimplemented from NodeRenderable. Definition at line 10504 of file fillattr.cpp. 10505 { 10506 #ifdef _DEBUG 10507 NodeAttribute::GetDebugDetails( Str ); 10508 10509 String_256 TempStr; 10510 10511 TempStr._MakeMsg( TEXT("\r\nDiamond Graduated Fill:\r\n")); 10512 (*Str) += TempStr; 10513 10514 // TempStr._MakeMsg(TEXT("\r\nStart")); 10515 // (*GetStartColour()).GetDebugDetails(&TempStr); 10516 // (*Str) += TempStr; 10517 10518 // TempStr._MakeMsg(TEXT("\r\nEnd")); 10519 // (*GetEndColour()).GetDebugDetails(&TempStr); 10520 // (*Str) += TempStr; 10521 10522 TempStr._MakeMsg(TEXT("\r\nStart = (#1%ld, #2%ld)"), 10523 (*GetStartPoint()).x, (*GetStartPoint()).y); 10524 (*Str) += TempStr; 10525 10526 TempStr._MakeMsg(TEXT("\r\nEnd = (#1%ld, #2%ld) "), 10527 (*GetEndPoint()).x, (*GetEndPoint()).y); 10528 (*Str) += TempStr; 10529 10530 TempStr._MakeMsg(TEXT("\r\n3rd = (#1%ld, #2%ld) "), 10531 (*GetEndPoint2()).x, (*GetEndPoint2()).y); 10532 (*Str) += TempStr; 10533 #endif 10534 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 10550 of file fillattr.cpp. 10551 { 10552 return sizeof(AttrSquareColourFill); 10553 }
|
|
Virtual function for determining if the node is a Colour Fill attribute.
Reimplemented from NodeAttribute. Definition at line 1344 of file fillattr2.h. 01344 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 1354 of file fillattr2.h. 01355 { 01356 return (GetStartColour() != NULL && GetStartColour()->IsTransparent() && 01357 GetEndColour() != NULL && GetEndColour()->IsTransparent()); 01358 }
|
|
'Renders' a Square Fill Colour attribute.
Reimplemented from NodeAttribute. Definition at line 10397 of file fillattr.cpp. 10398 { 10399 pRender->SetFillGeometry(&Value, FALSE); 10400 }
|
|
Renders the grad fills arrow blob when requested to by its selected parent.
Reimplemented from AttrSquareFill. Definition at line 10443 of file fillattr.cpp. 10444 { 10445 #if !defined(EXCLUDE_FROM_RALPH) 10446 if (!IsVisible()) 10447 return; // We're in Fill Transparency Mode 10448 10449 // Don't bother if this fill is being edited as a copy of it 10450 // we be rendered thoughout the drag op 10451 if (IsFillBeingEdited()) 10452 return; 10453 10454 // Ignore this if the mesh is the same as the last one rendered. 10455 if (CheckPreviousFillMesh()) 10456 return; 10457 10458 DocCoord ControlPoints[5]; 10459 ControlPoints[FILLCONTROL_STARTPOINT] = (*GetStartPoint()); 10460 ControlPoints[FILLCONTROL_ENDPOINT] = (*GetEndPoint()); 10461 ControlPoints[FILLCONTROL_SECONDARYPOINT] = (*GetEndPoint2()); 10462 10463 // Render a nice pretty Fill Mesh thingy 10464 RenderFillMesh(pRender, ControlPoints, SelectionState, 5); 10465 10466 // This call was removed by Gerry (2/9/96) as it causes blob problems 10467 // If we are removing blobs then force all blobs to be deselected 10468 // if ((Camelot.GetBlobManager())->IsRemovingBlobs()) 10469 // DeselectAllNoRedraw(); 10470 #endif 10471 }
|
|
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 10419 of file fillattr.cpp. 10420 { 10421 AttrSquareColourFill* NodeCopy = new AttrSquareColourFill(); 10422 if (NodeCopy == NULL) 10423 return NULL; 10424 10425 CopyNodeContents(NodeCopy); 10426 10427 return NodeCopy; 10428 }
|
|
Writes out colour definitions for this fill. > virtual BOOL AttrSquareColourFill::WriteColourDefinitions (BaseCamelotFilter* pFilter)
Reimplemented from AttrFillGeometry. Definition at line 10713 of file fillattr.cpp. 10714 { 10715 // Must write out the colours first 10716 INT32 StartColRef = pFilter->WriteRecord(&Value.Colour); 10717 INT32 EndColRef = pFilter->WriteRecord(&Value.EndColour); 10718 10719 BOOL ok = ((StartColRef != 0) && (EndColRef != 0)); 10720 10721 if (ok) 10722 { 10723 ColourRamp * pRamp = GetColourRamp(); 10724 if (pRamp) 10725 if (pRamp->GetCount() > 0) 10726 { 10727 ok = pRamp->WriteColourDefinitions (pFilter); 10728 } 10729 } 10730 10731 return (ok); 10732 }
|
|
Writes the Square fill record to the filter. > virtual BOOL AttrSquareColourFill::WritePreChildrenNative(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 10689 of file fillattr.cpp. 10690 { 10691 #ifdef DO_EXPORT 10692 return WritePreChildrenWeb(pFilter); 10693 #else 10694 return FALSE; 10695 #endif 10696 }
|
|
Writes the Square fill record to the filter. > virtual BOOL AttrSquareColourFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 10570 of file fillattr.cpp. 10571 { 10572 #ifdef DO_EXPORT 10573 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 10574 10575 // Must write out the colours first 10576 INT32 StartColRef = pFilter->WriteRecord(&Value.Colour); 10577 INT32 EndColRef = pFilter->WriteRecord(&Value.EndColour); 10578 10579 // am I a multistage fill ?? 10580 BOOL bMultistage = FALSE; 10581 10582 ColourRamp * pRamp = GetColourRamp(); 10583 INT32 * pRampColRefs = NULL; 10584 double * pPositions = NULL; 10585 ColRampItem * pItem = NULL; 10586 UINT32 NumRampItems = 0; 10587 10588 if (pRamp) 10589 { 10590 // write out all the colour references 10591 if (pRamp->GetCount() > 0) 10592 { 10593 bMultistage = TRUE; 10594 NumRampItems = pRamp->GetCount(); 10595 10596 pRampColRefs = new INT32[NumRampItems]; 10597 pPositions = new double[NumRampItems]; 10598 10599 pItem = (ColRampItem *)pRamp->GetHead(); 10600 10601 for (UINT32 i = 0 ; i < NumRampItems; i++) 10602 { 10603 if (pItem) 10604 { 10605 pPositions[i] = pItem->GetPosition(); 10606 DocColour tempcolour = pItem->GetColour(); 10607 pRampColRefs[i] = pFilter->WriteRecord(&tempcolour); 10608 } 10609 10610 pItem = (ColRampItem *)pRamp->GetNext(pItem); 10611 } 10612 } 10613 } 10614 10615 // Are the colour references ok? 10616 BOOL ok = ((StartColRef != 0) && (EndColRef != 0)); 10617 10618 if (ok) 10619 { 10620 if (!bMultistage) 10621 { 10622 CamelotFileRecord Rec(pFilter,TAG_SQUAREFILL,TAG_SQUAREFILL_SIZE); 10623 10624 if (ok) ok = Rec.Init(); 10625 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 10626 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 10627 if (ok) ok = Rec.WriteCoord(Value.EndPoint2); 10628 if (ok) ok = Rec.WriteReference(StartColRef); 10629 if (ok) ok = Rec.WriteReference(EndColRef); 10630 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ()); 10631 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ()); 10632 if (ok) ok = pFilter->Write(&Rec); 10633 } 10634 else 10635 { 10636 CamelotFileRecord Rec(pFilter,TAG_SQUAREFILLMULTISTAGE, 10637 TAG_SQUAREFILLMULTISTAGE_SIZE); 10638 10639 if (ok) ok = Rec.Init(); 10640 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 10641 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 10642 if (ok) ok = Rec.WriteCoord(Value.EndPoint2); 10643 if (ok) ok = Rec.WriteReference(StartColRef); 10644 if (ok) ok = Rec.WriteReference(EndColRef); 10645 10646 // now, write out all the colour ramp items 10647 if (ok) ok = Rec.WriteUINT32(NumRampItems); 10648 10649 for (UINT32 i = 0 ; i < NumRampItems; i++) 10650 { 10651 if (ok) ok = Rec.WriteDOUBLE(pPositions[i]); 10652 if (ok) ok = Rec.WriteReference(pRampColRefs[i]); 10653 } 10654 10655 if (ok) ok = pFilter->Write(&Rec); 10656 } 10657 } 10658 10659 if (pPositions) 10660 delete [] pPositions; 10661 10662 if (pRampColRefs) 10663 delete [] pRampColRefs; 10664 10665 if (!ok) 10666 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 10667 10668 return ok; 10669 #else 10670 return FALSE; 10671 #endif 10672 }
|
|
Definition at line 1361 of file fillattr2.h. |