#include <fillattr2.h>
Inheritance diagram for AttrRadialTranspFill:
Public Member Functions | |
AttrRadialTranspFill () | |
AttrRadialTranspFill (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
void | Render (RenderRegion *pRender) |
'Renders' a Radial Fill Colour attribute. | |
virtual 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 | NeedsToRenderAtEachBrushStroke () const |
So that don't have to keep re-rendering attributes whilst drawing a brush, this identifies whether or not the attribute need to be rendered at each step, e.g. radial fills. | |
virtual BOOL | HasEquivalentDefaultValue (BOOL bAppearance=FALSE) |
Determine whether this attribute has the default value or not. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the radial transparent fill record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
virtual BOOL | IsSeeThrough (BOOL CheckIndirectAttrs) |
Protected Attributes | |
RadialTranspFillAttribute | Value |
Definition at line 989 of file fillattr2.h.
|
Definition at line 994 of file fillattr2.h. 00994 : AttrRadialFill() {}
|
|
Definition at line 995 of file fillattr2.h. 01000 : 01001 AttrRadialFill(ContextNode, Direction, Locked, Mangled, Marked, Selected) {}
|
|
Reimplemented from AttrFillGeometry. Definition at line 1016 of file fillattr2.h. 01016 { return ChangeTransp(pValue); }
|
|
Reimplemented from NodeAttribute. Definition at line 1013 of file fillattr2.h. 01013 { return CC_RUNTIME_CLASS(AttrTranspFillGeometry); }
|
|
Implements AttrRadialFill. Definition at line 1014 of file fillattr2.h. 01014 { return &Value; }
|
|
Returns a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 8246 of file fillattr.cpp. 08247 { 08248 if (!IsATranspFill ()) 08249 { 08250 if (IsElliptical ()) 08251 { 08252 return (_R(IDS_LINEARGRADFILL)); 08253 } 08254 else 08255 { 08256 return (_R(IDS_CIRCULARGRADFILL)); 08257 } 08258 } 08259 else 08260 { 08261 if (IsElliptical ()) 08262 { 08263 return (_R(IDS_ELLIPITICALTRANSPFILL)); 08264 } 08265 else 08266 { 08267 return (_R(IDS_CIRCULARTRANSPFILL)); 08268 } 08269 } 08270 }
|
|
Output details of this attribute to the Camelot debug tree dialog.
Reimplemented from NodeRenderable. Definition at line 8283 of file fillattr.cpp. 08284 { 08285 #ifdef _DEBUG 08286 NodeAttribute::GetDebugDetails( Str ); 08287 08288 String_256 TempStr; 08289 08290 TempStr._MakeMsg( TEXT("\r\nRadial Graduated Fill:\r\n")); 08291 (*Str) += TempStr; 08292 08293 TempStr._MakeMsg(TEXT("\r\nStart")); 08294 (*Str) += TempStr; 08295 08296 TempStr._MakeMsg(TEXT("\r\nEnd")); 08297 (*Str) += TempStr; 08298 08299 TempStr._MakeMsg(TEXT("\r\nStart point =(#1%ld, #2%ld)"), 08300 (*GetStartPoint()).x, (*GetStartPoint()).y); 08301 (*Str) += TempStr; 08302 08303 TempStr._MakeMsg(TEXT("\r\nEnd point =(#1%ld, #2%ld), "), 08304 (*GetEndPoint()).x, (*GetEndPoint()).y); 08305 (*Str) += TempStr; 08306 08307 TempStr._MakeMsg(TEXT("\r\nEnd point2 = (#1%ld, #2%ld) "), 08308 (*GetEndPoint2()).x, (*GetEndPoint2()).y); 08309 (*Str) += TempStr; 08310 #endif 08311 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 8325 of file fillattr.cpp. 08326 { 08327 return sizeof(AttrRadialTranspFill); 08328 }
|
|
Determine whether this attribute has the default value or not.
Reimplemented from NodeAttribute. Definition at line 8423 of file fillattr.cpp. 08424 { 08425 // Slight bodge - we will assume that the default transparency is fully opaque 08426 if (bAppearance) 08427 return (Value.TranspType==TT_NoTranspType || (Value.TranspType==TT_Mix && Value.Transp == 0 && Value.EndTransp==0)); 08428 else 08429 return FALSE; 08430 }
|
|
Virtual function for determining if the node is an attribute.
Reimplemented from NodeAttribute. Definition at line 1018 of file fillattr2.h. 01018 { return TRUE; }
|
|
Reimplemented from NodeAttribute. Definition at line 1029 of file fillattr2.h. 01029 { 01030 return ((GetStartTransp() != NULL && *GetStartTransp() != 0) || 01031 (GetEndTransp() != NULL && *GetEndTransp() != 0)); 01032 }
|
|
Reimplemented from AttrFillGeometry. Definition at line 1010 of file fillattr2.h. 01010 { return IsTranspMeshVisible(); }
|
|
So that don't have to keep re-rendering attributes whilst drawing a brush, this identifies whether or not the attribute need to be rendered at each step, e.g. radial fills.
Reimplemented from AttrRadialFill. Definition at line 8348 of file fillattr.cpp. 08349 { 08350 return TRUE; 08351 }
|
|
Called.
Reimplemented from AttrFillGeometry. Definition at line 20141 of file fillattr.cpp. 20142 { 20143 AttrRadialTranspFill* pNonConst = (AttrRadialTranspFill*) this; 20144 return ( pNonConst->GetTranspType() != TT_Mix || 20145 *(pNonConst->GetStartTransp()) != 0 || 20146 *(pNonConst->GetEndTransp()) != 0 ); 20147 }
|
|
'Renders' a Radial Fill Colour attribute.
Reimplemented from NodeAttribute. Definition at line 8204 of file fillattr.cpp. 08205 { 08206 pRender->SetTranspFillGeometry(&Value, FALSE); 08207 }
|
|
Renders the grad fills arrow blob when requested to by its selected parent.
Reimplemented from AttrRadialFill. Definition at line 7791 of file fillattr.cpp. 07792 { 07793 #if !defined(EXCLUDE_FROM_RALPH) 07794 if (!IsVisible()) 07795 return; // We're Not in Fill Transparency Mode 07796 07797 // Don't bother if this fill is being edited as a copy of it 07798 // we be rendered thoughout the drag op 07799 if (IsFillBeingEdited()) 07800 return; 07801 07802 // Ignore this if the mesh is the same as the last one rendered. 07803 if (CheckPreviousFillMesh()) 07804 return; 07805 07806 DocCoord ControlPoints[5]; 07807 ControlPoints[FILLCONTROL_STARTPOINT] = (*GetStartPoint()); 07808 ControlPoints[FILLCONTROL_ENDPOINT] = (*GetEndPoint()); 07809 ControlPoints[FILLCONTROL_SECONDARYPOINT] = (*GetEndPoint2()); 07810 07811 // Render a nice pretty Fill Mesh thingy 07812 RenderFillMesh(pRender, ControlPoints, SelectionState, 5); 07813 07814 // This call was removed by Gerry (2/9/96) as it causes blob problems 07815 // If we are removing blobs then force all blobs to be deselected 07816 // if ((Camelot.GetBlobManager())->IsRemovingBlobs()) 07817 // DeselectAllNoRedraw(); 07818 #endif 07819 }
|
|
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 8224 of file fillattr.cpp. 08225 { 08226 AttrRadialTranspFill* NodeCopy = new AttrRadialTranspFill(); 08227 if (NodeCopy == NULL) 08228 return NULL; 08229 08230 CopyNodeContents(NodeCopy); 08231 08232 return NodeCopy; 08233 }
|
|
Reimplemented from Node. Definition at line 8438 of file fillattr.cpp. 08439 { 08440 #ifdef DO_EXPORT 08441 return WritePreChildrenWeb(pFilter); 08442 #else 08443 return FALSE; 08444 #endif 08445 }
|
|
Writes the radial transparent fill record to the filter. > virtual BOOL AttrRadialTranspFill::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 8366 of file fillattr.cpp. 08367 { 08368 #ifdef DO_EXPORT 08369 ERROR2IF(pFilter == NULL,FALSE,"NULL filter param"); 08370 ERROR3IF(Value.Transp > 255,"Start transparency level is too high to be stored as a byte"); 08371 ERROR3IF(Value.EndTransp > 255,"End transparency level is too high to be stored as a byte"); 08372 ERROR3IF(Value.TranspType > 255,"Transparency type is too high to be stored as a byte"); 08373 08374 BOOL ok = TRUE; 08375 08376 UINT32 Tag = TAG_CIRCULARTRANSPARENTFILL, TagSize = TAG_CIRCULARTRANSPARENTFILL_SIZE; 08377 08378 if (IsElliptical()) 08379 { 08380 Tag = TAG_ELLIPTICALTRANSPARENTFILL; 08381 TagSize = TAG_ELLIPTICALTRANSPARENTFILL_SIZE; 08382 } 08383 08384 CamelotFileRecord Rec(pFilter,Tag,TagSize); 08385 08386 if (ok) ok = Rec.Init(); 08387 if (ok) ok = Rec.WriteCoord(Value.StartPoint); 08388 if (ok) ok = Rec.WriteCoord(Value.EndPoint); 08389 08390 if (ok && IsElliptical()) 08391 if (ok) ok = Rec.WriteCoord(Value.EndPoint2); 08392 08393 if (ok) ok = Rec.WriteBYTE(BYTE(Value.Transp)); 08394 if (ok) ok = Rec.WriteBYTE(BYTE(Value.EndTransp)); 08395 if (ok) ok = Rec.WriteBYTE(BYTE(Value.TranspType)); 08396 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetBias ()); 08397 if (ok) ok = Rec.WriteDOUBLE ((double) GetProfile ().GetGain ()); 08398 if (ok) ok = pFilter->Write(&Rec); 08399 08400 if (!ok) 08401 pFilter->GotError(_R(IDE_FILE_WRITE_ERROR)); 08402 08403 return ok; 08404 #else 08405 return FALSE; 08406 #endif 08407 }
|
|
Definition at line 1035 of file fillattr2.h. |