#include <fillattr2.h>
Inheritance diagram for AttrConicalColourFill:
Public Member Functions | |
AttrConicalColourFill () | |
AttrConicalColourFill (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. | |
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 conical fill record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
virtual BOOL | WriteColourDefinitions (BaseCamelotFilter *pFilter) |
Writes out colour definitions for this fill. | |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
ConicalFillAttribute | Value |
Definition at line 1149 of file fillattr2.h.
|
Definition at line 1154 of file fillattr2.h. 01154 : AttrConicalFill() {}
|
|
Definition at line 1155 of file fillattr2.h. 01160 : 01161 AttrConicalFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
|
|
Reimplemented from AttrFillGeometry. Definition at line 1174 of file fillattr2.h. 01174 { return ChangeColour(pValue); }
|
|
Reimplemented from NodeAttribute. Definition at line 1171 of file fillattr2.h. 01171 { return CC_RUNTIME_CLASS(AttrFillGeometry); }
|
|
Implements AttrConicalFill. Definition at line 1172 of file fillattr2.h. 01172 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 9374 of file fillattr.cpp. 09375 { 09376 return (_R(IDS_CONICALGRADFILL)); 09377 }
|
|
Output details of this attribute to the Camelot debug tree dialog.
Reimplemented from NodeRenderable. Definition at line 9390 of file fillattr.cpp. 09391 { 09392 #ifdef _DEBUG 09393 NodeAttribute::GetDebugDetails( Str ); 09394 09395 String_256 TempStr; 09396 09397 TempStr._MakeMsg( TEXT("\r\nConical Graduated Fill:\r\n")); 09398 (*Str) += TempStr; 09399 09400 // TempStr._MakeMsg(TEXT("\r\nStart")); 09401 // (*GetStartColour()).GetDebugDetails(&TempStr); 09402 // (*Str) += TempStr; 09403 09404 // TempStr._MakeMsg(TEXT("\r\nEnd")); 09405 // (*GetEndColour()).GetDebugDetails(&TempStr); 09406 // (*Str) += TempStr; 09407 09408 TempStr._MakeMsg(TEXT("\r\nStart point =(#1%ld, #2%ld)"), 09409 (*GetStartPoint()).x, (*GetStartPoint()).y); 09410 (*Str) += TempStr; 09411 09412 TempStr._MakeMsg(TEXT("\r\nEnd point =(#1%ld, #2%ld), "), 09413 (*GetEndPoint()).x, (*GetEndPoint()).y); 09414 (*Str) += TempStr; 09415 #endif 09416 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 9430 of file fillattr.cpp. 09431 { 09432 return sizeof(AttrConicalColourFill); 09433 }
|
|
Virtual function for determining if the node is a Colour Fill attribute.
Reimplemented from NodeAttribute. Definition at line 1176 of file fillattr2.h. 01176 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 1186 of file fillattr2.h. 01187 { 01188 return (GetStartColour() != NULL && GetStartColour()->IsTransparent() && 01189 GetEndColour() != NULL && GetEndColour()->IsTransparent()); 01190 }
|
|
'Renders' a Conical Fill Colour attribute.
Reimplemented from NodeAttribute. Definition at line 9332 of file fillattr.cpp. 09333 { 09334 pRender->SetFillGeometry(&Value, FALSE); 09335 }
|
|
Renders the grad fills arrow blob when requested to by its selected parent.
Reimplemented from AttrConicalFill. Definition at line 9247 of file fillattr.cpp. 09248 { 09249 #if !defined(EXCLUDE_FROM_RALPH) 09250 if (!IsVisible()) 09251 return; // We're in Fill Transparency Mode 09252 09253 // Don't bother if this fill is being edited as a copy of it 09254 // we be rendered thoughout the drag op 09255 if (IsFillBeingEdited()) 09256 return; 09257 09258 // Ignore this if the mesh is the same as the last one rendered. 09259 if (CheckPreviousFillMesh()) 09260 return; 09261 09262 DocCoord ControlPoints[2]; 09263 ControlPoints[0] = (*GetStartPoint()); 09264 ControlPoints[1] = (*GetEndPoint()); 09265 09266 // Render a nice pretty Fill Mesh thingy 09267 RenderFillMesh(pRender, ControlPoints, SelectionState, 2); 09268 09269 // This call was removed by Gerry (2/9/96) as it causes blob problems 09270 // If we are removing blobs then force all blobs to be deselected 09271 // if ((Camelot.GetBlobManager())->IsRemovingBlobs()) 09272 // DeselectAllNoRedraw(); 09273 #endif 09274 }
|
|
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 9352 of file fillattr.cpp. 09353 { 09354 AttrConicalColourFill* NodeCopy = new AttrConicalColourFill(); 09355 if (NodeCopy == NULL) 09356 return NULL; 09357 09358 CopyNodeContents(NodeCopy); 09359 09360 return NodeCopy; 09361 }
|
|
Writes out colour definitions for this fill. > virtual BOOL AttrConicalColourFill::WriteColourDefinitions (BaseCamelotFilter* pFilter)
Reimplemented from AttrFillGeometry. Definition at line 9579 of file fillattr.cpp. 09580 { 09581 // Must write out the colours first 09582 INT32 StartColRef = pFilter->WriteRecord(&Value.Colour); 09583 INT32 EndColRef = pFilter->WriteRecord(&Value.EndColour); 09584 09585 BOOL ok = ((StartColRef != 0) && (EndColRef != 0)); 09586 09587 if (ok) 09588 { 09589 ColourRamp * pRamp = GetColourRamp(); 09590 if (pRamp) 09591 if (pRamp->GetCount() > 0) 09592 { 09593 ok = pRamp->WriteColourDefinitions (pFilter); 09594 } 09595 } 09596 09597 return (ok); 09598 }
|
|
Reimplemented from Node. Definition at line 9555 of file fillattr.cpp. 09556 { 09557 #ifdef DO_EXPORT 09558 return WritePreChildrenWeb(pFilter); 09559 #else 09560 return FALSE; 09561 #endif 09562 }
|
|
Writes the conical fill record to the filter. > virtual BOOL AttrConicalColourFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 9450 of file fillattr.cpp. 09451 { 09452 #ifdef DO_EXPORT 09453 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 09454 09455 // Must write out the colours first 09456 INT32 StartColRef = pFilter->WriteRecord(&Value.Colour); 09457 INT32 EndColRef = pFilter->WriteRecord(&Value.EndColour); 09458 09459 // am I a multistage fill ?? 09460 BOOL bMultistage = FALSE; 09461 09462 ColourRamp * pRamp = GetColourRamp(); 09463 INT32 * pRampColRefs = NULL; 09464 double * pPositions = NULL; 09465 ColRampItem * pItem = NULL; 09466 UINT32 NumRampItems = 0; 09467 09468 if (pRamp) 09469 { 09470 // write out all the colour references 09471 if (pRamp->GetCount() > 0) 09472 { 09473 bMultistage = TRUE; 09474 NumRampItems = pRamp->GetCount(); 09475 09476 pRampColRefs = new INT32[NumRampItems]; 09477 pPositions = new double[NumRampItems]; 09478 09479 pItem = (ColRampItem *)pRamp->GetHead(); 09480 09481 for (UINT32 i = 0 ; i < NumRampItems; i++) 09482 { 09483 if (pItem) 09484 { 09485 pPositions[i] = pItem->GetPosition(); 09486 DocColour tempcolour = pItem->GetColour(); 09487 pRampColRefs[i] = pFilter->WriteRecord(&tempcolour); 09488 } 09489 09490 pItem = (ColRampItem *)pRamp->GetNext(pItem); 09491 } 09492 } 09493 } 09494 09495 // Are the colour references ok? 09496 BOOL ok = ((StartColRef != 0) && (EndColRef != 0)); 09497 09498 if (ok) 09499 { 09500 if (!bMultistage) 09501 { 09502 CamelotFileRecord Rec(pFilter,TAG_CONICALFILL,TAG_CONICALFILL_SIZE); 09503 09504 if (ok) ok = Rec.Init(); 09505 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 09506 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 09507 if (ok) ok = Rec.WriteReference(StartColRef); 09508 if (ok) ok = Rec.WriteReference(EndColRef); 09509 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ()); 09510 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ()); 09511 if (ok) ok = pFilter->Write(&Rec); 09512 } 09513 else 09514 { 09515 CamelotFileRecord Rec(pFilter,TAG_CONICALFILLMULTISTAGE, 09516 TAG_CONICALFILLMULTISTAGE_SIZE); 09517 09518 if (ok) ok = Rec.Init(); 09519 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 09520 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 09521 if (ok) ok = Rec.WriteReference(StartColRef); 09522 if (ok) ok = Rec.WriteReference(EndColRef); 09523 09524 // now, write out all the colour ramp items 09525 if (ok) ok = Rec.WriteUINT32(NumRampItems); 09526 09527 for (UINT32 i = 0 ; i < NumRampItems; i++) 09528 { 09529 if (ok) ok = Rec.WriteDOUBLE(pPositions[i]); 09530 if (ok) ok = Rec.WriteReference(pRampColRefs[i]); 09531 } 09532 09533 if (ok) ok = pFilter->Write(&Rec); 09534 } 09535 } 09536 09537 if (pPositions) 09538 delete [] pPositions; 09539 09540 if (pRampColRefs) 09541 delete [] pRampColRefs; 09542 09543 if (!ok) 09544 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 09545 09546 return ok; 09547 #else 09548 return FALSE; 09549 #endif 09550 }
|
|
Definition at line 1193 of file fillattr2.h. |