#include <fillattr2.h>
Inheritance diagram for AttrFourColColourFill:
Public Member Functions | |
AttrFourColColourFill () | |
AttrFourColColourFill (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 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 FourCol fill record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
Writes the FourCol fill record to the filter. | |
virtual BOOL | WriteColourDefinitions (BaseCamelotFilter *pFilter) |
Writes out colour definitions for this fill. | |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
FourColFillAttribute | Value |
Definition at line 1680 of file fillattr2.h.
|
Definition at line 1685 of file fillattr2.h. 01685 : AttrFourColFill() {}
|
|
Definition at line 1686 of file fillattr2.h. 01691 : 01692 AttrFourColFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
|
|
Reimplemented from AttrFillGeometry. Definition at line 1705 of file fillattr2.h. 01705 { return ChangeColour(pValue); }
|
|
Reimplemented from NodeAttribute. Definition at line 1702 of file fillattr2.h. 01702 { return CC_RUNTIME_CLASS(AttrFillGeometry); }
|
|
Implements AttrFourColFill. Definition at line 1703 of file fillattr2.h. 01703 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 13277 of file fillattr.cpp. 13278 { 13279 return (_R(IDS_FOURCOLGRADFILL)); 13280 }
|
|
Output details of this attribute to the Camelot debug tree dialog.
Reimplemented from NodeRenderable. Definition at line 13295 of file fillattr.cpp. 13296 { 13297 #ifdef _DEBUG 13298 NodeAttribute::GetDebugDetails( Str ); 13299 13300 String_256 TempStr; 13301 13302 TempStr._MakeMsg( TEXT("\r\nFour colour graduated fill:\r\n")); 13303 (*Str) += TempStr; 13304 13305 // TempStr._MakeMsg(TEXT("\r\nStart")); 13306 // (*GetStartColour()).GetDebugDetails(&TempStr); 13307 // (*Str) += TempStr; 13308 13309 // TempStr._MakeMsg(TEXT("\r\nEnd")); 13310 // (*GetEndColour()).GetDebugDetails(&TempStr); 13311 // (*Str) += TempStr; 13312 13313 // TempStr._MakeMsg(TEXT("\r\nEnd2")); 13314 // (*GetEndColour2()).GetDebugDetails(&TempStr); 13315 // (*Str) += TempStr; 13316 13317 // TempStr._MakeMsg(TEXT("\r\nEnd3")); 13318 // (*GetEndColour3()).GetDebugDetails(&TempStr); 13319 // (*Str) += TempStr; 13320 13321 TempStr._MakeMsg(TEXT("\r\nStart = (#1%ld, #2%ld)"), 13322 (*GetStartPoint()).x, (*GetStartPoint()).y); 13323 (*Str) += TempStr; 13324 13325 TempStr._MakeMsg(TEXT("\r\nEnd = (#1%ld, #2%ld) "), 13326 (*GetEndPoint()).x, (*GetEndPoint()).y); 13327 (*Str) += TempStr; 13328 13329 TempStr._MakeMsg(TEXT("\r\n3rd = (#1%ld, #2%ld) "), 13330 (*GetEndPoint2()).x, (*GetEndPoint2()).y); 13331 (*Str) += TempStr; 13332 #endif 13333 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 13349 of file fillattr.cpp. 13350 { 13351 return sizeof(AttrFourColColourFill); 13352 }
|
|
Virtual function for determining if the node is a Colour Fill attribute.
Reimplemented from NodeAttribute. Definition at line 1707 of file fillattr2.h. 01707 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 1717 of file fillattr2.h. 01718 { 01719 return (GetStartColour() != NULL && GetStartColour()->IsTransparent() && 01720 GetEndColour() != NULL && GetEndColour()->IsTransparent()); 01721 }
|
|
'Renders' a FourCol Fill Colour attribute.
Reimplemented from NodeAttribute. Definition at line 13181 of file fillattr.cpp. 13182 { 13183 pRender->SetFillGeometry(&Value, FALSE); 13184 }
|
|
Renders the grad fills arrow blob when requested to by its selected parent.
Reimplemented from AttrFourColFill. Definition at line 13227 of file fillattr.cpp. 13228 { 13229 #if !defined(EXCLUDE_FROM_RALPH) 13230 if (!IsVisible()) 13231 return; // We're in Fill Transparency Mode 13232 13233 // Don't bother if this fill is being edited as a copy of it 13234 // we be rendered thoughout the drag op 13235 if (IsFillBeingEdited()) 13236 return; 13237 13238 // Ignore this if the mesh is the same as the last one rendered. 13239 if (CheckPreviousFillMesh()) 13240 return; 13241 13242 // Get the control points 13243 DocCoord StartPoint = *GetStartPoint(); 13244 DocCoord EndPoint = *GetEndPoint(); 13245 DocCoord EndPoint2 = *GetEndPoint2(); 13246 DocCoord EndPoint3 = EndPoint2 + EndPoint - StartPoint; 13247 13248 DocCoord ControlPoints[4]; 13249 ControlPoints[FILLCONTROL_STARTPOINT] = StartPoint; 13250 ControlPoints[FILLCONTROL_ENDPOINT] = EndPoint; 13251 ControlPoints[FILLCONTROL_ENDPOINT2] = EndPoint2; 13252 ControlPoints[FILLCONTROL_ENDPOINT3] = EndPoint3; 13253 13254 // Render a nice pretty Fill Mesh thingy 13255 RenderFillMesh(pRender, ControlPoints, SelectionState, 4); 13256 13257 // This call was removed by Gerry (2/9/96) as it causes blob problems 13258 // If we are removing blobs then force all blobs to be deselected 13259 // if ((Camelot.GetBlobManager())->IsRemovingBlobs()) 13260 // DeselectAllNoRedraw(); 13261 #endif 13262 }
|
|
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 13203 of file fillattr.cpp. 13204 { 13205 AttrFourColColourFill* NodeCopy = new AttrFourColColourFill(); 13206 if (NodeCopy == NULL) 13207 return NULL; 13208 13209 CopyNodeContents(NodeCopy); 13210 13211 return NodeCopy; 13212 }
|
|
Writes out colour definitions for this fill. > virtual BOOL AttrFourColColourFill::WriteColourDefinitions (BaseCamelotFilter* pFilter)
Reimplemented from AttrFillGeometry. Definition at line 13446 of file fillattr.cpp. 13447 { 13448 // Must write out the colours first 13449 INT32 StartColRef = pFilter->WriteRecord(&Value.Colour); 13450 INT32 EndColRef = pFilter->WriteRecord(&Value.EndColour); 13451 INT32 EndCol2Ref = pFilter->WriteRecord(&Value.EndColour2); 13452 INT32 EndCol3Ref = pFilter->WriteRecord(&Value.EndColour3); 13453 13454 // Are the colour references ok? 13455 BOOL ok = ((StartColRef != 0) && (EndColRef != 0) && (EndCol2Ref != 0) && (EndCol3Ref != 0)); 13456 13457 return (ok); 13458 }
|
|
Writes the FourCol fill record to the filter. > virtual BOOL AttrFourColColourFill::WritePreChildrenNative(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 13422 of file fillattr.cpp. 13423 { 13424 #ifdef DO_EXPORT 13425 return WritePreChildrenWeb(pFilter); 13426 #else 13427 return FALSE; 13428 #endif 13429 }
|
|
Writes the FourCol fill record to the filter. > virtual BOOL AttrFourColColourFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 13369 of file fillattr.cpp. 13370 { 13371 #ifdef DO_EXPORT 13372 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 13373 13374 // Must write out the colours first 13375 INT32 StartColRef = pFilter->WriteRecord(&Value.Colour); 13376 INT32 EndColRef = pFilter->WriteRecord(&Value.EndColour); 13377 INT32 EndCol2Ref = pFilter->WriteRecord(&Value.EndColour2); 13378 INT32 EndCol3Ref = pFilter->WriteRecord(&Value.EndColour3); 13379 13380 // Are the colour references ok? 13381 BOOL ok = ((StartColRef != 0) && (EndColRef != 0) && (EndCol2Ref != 0) && (EndCol3Ref != 0)); 13382 13383 if (ok) 13384 { 13385 CamelotFileRecord Rec(pFilter,TAG_FOURCOLFILL,TAG_FOURCOLFILL_SIZE); 13386 13387 if (ok) ok = Rec.Init(); 13388 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 13389 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 13390 if (ok) ok = Rec.WriteCoord(Value.EndPoint2); 13391 if (ok) ok = Rec.WriteReference(StartColRef); 13392 if (ok) ok = Rec.WriteReference(EndColRef); 13393 if (ok) ok = Rec.WriteReference(EndCol2Ref); 13394 if (ok) ok = Rec.WriteReference(EndCol3Ref); 13395 if (ok) ok = pFilter->Write(&Rec); 13396 } 13397 13398 if (!ok) 13399 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 13400 13401 return ok; 13402 #else 13403 return FALSE; 13404 #endif 13405 }
|
|
Definition at line 1724 of file fillattr2.h. |