#include <fillval.h>
Inheritance diagram for FlatTranspFillAttribute:
Public Member Functions | |
FlatTranspFillAttribute () | |
Default Constuctor for fill attribute values. | |
FlatTranspFillAttribute (UINT32 NewTransp) | |
virtual BOOL | Blend (BlendAttrParam *pBlendParam) |
Blends between two flat fill attributes. This current calls the general fill blend function. (See FillGeometryAttribute::Blend). | |
virtual NodeAttribute * | MakeNode () |
Make a AttrFlatColourFill node from this flat fill colour attribute. | |
virtual BOOL | IsAFlatFill () |
virtual ColourFillAttribute * | MakeSimilarNonTranspFillGeometry (double TransparencyScale) |
Creates a non-transparent version of this transparent fill attribute. For Flat fills we just return a FlatFillAttribute whose start colour is set to a greyscale version of the intensity of the transparency. (The original use of this was so airbrushes could maintain their fill's transparency geometry). | |
virtual INT32 | GetGeometryShape () |
Definition at line 1039 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 4357 of file fillval.cpp.
|
|
Definition at line 1044 of file fillval.h. 01044 { SetStartTransp(&NewTransp); }
|
|
Blends between two flat fill attributes. This current calls the general fill blend function. (See FillGeometryAttribute::Blend).
Reimplemented from FillGeometryAttribute. Definition at line 9698 of file fillval.cpp. 09699 { 09700 // Since this is a flat fill, we will use the other fill's geometry 09701 // (mainly for ArtWorks compatability) 09702 09703 // First get the fill that we are blending to 09704 FillGeometryAttribute* OtherFill = 09705 (FillGeometryAttribute*)pBlendParam->GetOtherAttrVal(); 09706 09707 // Make a new object of the same type 09708 CCRuntimeClass* ObjectType = OtherFill->GetRuntimeClass(); 09709 FillGeometryAttribute* pNewAttr = (FillGeometryAttribute*)ObjectType->CreateObject(); 09710 09711 if (pNewAttr == NULL) 09712 { 09713 // Fail if we couldn't create the new fill 09714 pBlendParam->SetBlendedAttrVal(NULL); 09715 return FALSE; 09716 } 09717 09718 // Make the new fill an exact copy of the other one 09719 pNewAttr->SimpleCopy(OtherFill); 09720 09721 // and what point along the blend we are at 09722 double Ratio = pBlendParam->GetBlendRatio(); 09723 double objectRatio = pBlendParam->GetObjectRatio(); 09724 09725 // Blend the Start and End Transparencies 09726 UINT32 BlendTransp; 09727 09728 if (BlendFillTransp(GetStartTransp(), OtherFill->GetStartTransp(), &BlendTransp, Ratio, pBlendParam)) 09729 pNewAttr->SetStartTransp(&BlendTransp); 09730 09731 if (BlendFillTransp(GetStartTransp(), OtherFill->GetEndTransp(), &BlendTransp, Ratio, pBlendParam)) 09732 pNewAttr->SetEndTransp(&BlendTransp); 09733 09734 09735 // Blend the Control Points 09736 DocCoord BlendPoint; 09737 09738 if (!pBlendParam->GetObjectProfileProcessing ()) 09739 { 09740 // were not doing object processing - fill positions are affected by attribute ratio .... 09741 if (BlendControlPoints(GetStartPoint(), OtherFill->GetStartPoint(), &BlendPoint, Ratio, pBlendParam)) 09742 pNewAttr->SetStartPoint(&BlendPoint); 09743 09744 if (BlendControlPoints(GetEndPoint(), OtherFill->GetEndPoint(), &BlendPoint, Ratio, pBlendParam)) 09745 pNewAttr->SetEndPoint(&BlendPoint); 09746 09747 if (BlendControlPoints(GetEndPoint2(), OtherFill->GetEndPoint2(), &BlendPoint, Ratio, pBlendParam)) 09748 pNewAttr->SetEndPoint2(&BlendPoint); 09749 } 09750 else 09751 { 09752 // were are doing object processing - fill positions are affected by object ratio .... 09753 if (BlendControlPoints(GetStartPoint(), OtherFill->GetStartPoint(), &BlendPoint, objectRatio, pBlendParam)) 09754 pNewAttr->SetStartPoint(&BlendPoint); 09755 09756 if (BlendControlPoints(GetEndPoint(), OtherFill->GetEndPoint(), &BlendPoint, objectRatio, pBlendParam)) 09757 pNewAttr->SetEndPoint(&BlendPoint); 09758 09759 if (BlendControlPoints(GetEndPoint2(), OtherFill->GetEndPoint2(), &BlendPoint, objectRatio, pBlendParam)) 09760 pNewAttr->SetEndPoint2(&BlendPoint); 09761 } 09762 09763 // Set the new fill as the blended attribute 09764 pBlendParam->SetBlendedAttrVal(pNewAttr); 09765 09766 return TRUE; 09767 }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1054 of file fillval.h. 01054 { return(FILLSHAPE_FLAT); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1050 of file fillval.h. 01050 { return TRUE; }
|
|
Make a AttrFlatColourFill node from this flat fill colour attribute.
Reimplemented from AttributeValue. Definition at line 4374 of file fillval.cpp. 04375 { 04376 // Create new attribute node 04377 AttrFlatTranspFill *pAttr = new AttrFlatTranspFill; 04378 if (pAttr==NULL) 04379 // error message has already been set by new 04380 return NULL; 04381 04382 // Copy attribute value into the new node. 04383 pAttr->GetAttributeValue()->SimpleCopy(this); 04384 04385 // Return the new node 04386 return pAttr; 04387 }
|
|
Creates a non-transparent version of this transparent fill attribute. For Flat fills we just return a FlatFillAttribute whose start colour is set to a greyscale version of the intensity of the transparency. (The original use of this was so airbrushes could maintain their fill's transparency geometry).
Reimplemented from TranspFillAttribute. Definition at line 4413 of file fillval.cpp. 04414 { 04415 UINT32 *pStartTransparency = GetStartTransp(); 04416 if(pStartTransparency == NULL) 04417 return NULL; 04418 04419 FlatFillAttribute *pNewAttr = new FlatFillAttribute; 04420 if (pNewAttr != NULL) 04421 { 04422 INT32 Transparency = 255 - (INT32)(((double)(255 - *pStartTransparency)) * TransparencyScale); 04423 DocColour color(Transparency, Transparency, Transparency); 04424 pNewAttr->SetStartColour( &color ); 04425 } 04426 04427 return(pNewAttr); 04428 }
|