#include <fillval.h>
Inheritance diagram for LinearTranspFillAttribute:
Public Member Functions | |
LinearTranspFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrLinearFill node from this graduated fill attribute. | |
virtual DocCoord * | GetEndPoint2 () |
virtual void | SetEndPoint2 (DocCoord *Pos) |
Sets the End Point of this fill. | |
virtual DocCoord * | GetEndPoint3 () |
virtual void | SetEndPoint3 (DocCoord *Pos) |
Sets the End Point of this fill. | |
virtual BOOL | IsPerspective () |
virtual void | MakePerspective () |
Make the fill perspectived. This should be called just before it is transformed by the moulder, so it can validate the 4th control point. | |
virtual void | RemovePerspective () |
Removes perspective from this fill. | |
virtual BOOL | IsALinearFill () |
virtual ColourFillAttribute * | MakeSimilarNonTranspFillGeometry (double TransparencyScale) |
Creates a non-transparent version of this transparent fill attribute. (The original use of this was so airbrushes could maintain their fill's transparency geometry). | |
virtual INT32 | GetGeometryShape () |
virtual AttributeValue * | MouldIntoStroke (PathStrokerVector *pMoulder, double TransScale=1.0) |
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path. | |
Public Attributes | |
DocCoord | EndPoint2 |
DocCoord | EndPoint3 |
BOOL | IsPersp |
Definition at line 1132 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 4824 of file fillval.cpp.
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1139 of file fillval.h. 01139 { return &EndPoint2; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1141 of file fillval.h. 01141 { return &EndPoint3; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1152 of file fillval.h. 01152 { return(FILLSHAPE_LINEAR); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1148 of file fillval.h. 01148 { return TRUE; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1144 of file fillval.h. 01144 { return IsPersp; }
|
|
Make a AttrLinearFill node from this graduated fill attribute.
Reimplemented from AttributeValue. Definition at line 4842 of file fillval.cpp. 04843 { 04844 // Create new attribute node 04845 AttrLinearTranspFill *pAttr = new AttrLinearTranspFill; 04846 if (pAttr==NULL) 04847 // error message has already been set by new 04848 return NULL; 04849 04850 // Copy attribute value into the new node. 04851 pAttr->GetAttributeValue()->SimpleCopy(this); 04852 04853 // Return the new node 04854 return pAttr; 04855 }
|
|
Make the fill perspectived. This should be called just before it is transformed by the moulder, so it can validate the 4th control point.
Reimplemented from FillGeometryAttribute. Definition at line 4912 of file fillval.cpp. 04913 { 04914 IsPersp = TRUE; 04915 04916 INT32 dx1 = EndPoint.x - StartPoint.x; 04917 INT32 dx2 = EndPoint2.x - StartPoint.x; 04918 04919 INT32 dy1 = EndPoint.y - StartPoint.y; 04920 INT32 dy2 = EndPoint2.y - StartPoint.y; 04921 04922 DocCoord Pos3(StartPoint.x + dx1 + dx2, StartPoint.y + dy1 + dy2); 04923 SetEndPoint3(&Pos3); 04924 }
|
|
Creates a non-transparent version of this transparent fill attribute. (The original use of this was so airbrushes could maintain their fill's transparency geometry).
Reimplemented from GradTranspFillAttribute. Definition at line 4962 of file fillval.cpp. 04963 { 04964 UINT32 *pStartTransp = GetStartTransp(); 04965 UINT32 *pEndTransp = GetEndTransp(); 04966 04967 if(pStartTransp == NULL || pEndTransp == NULL) 04968 return NULL; 04969 04970 LinearFillAttribute *pNewAttr = new LinearFillAttribute; 04971 if (pNewAttr != NULL) 04972 { 04973 pNewAttr->SetStartPoint(GetStartPoint()); 04974 pNewAttr->SetEndPoint(GetEndPoint()); 04975 pNewAttr->SetEndPoint2(GetEndPoint2()); 04976 pNewAttr->SetEndPoint3(GetEndPoint3()); 04977 04978 if(IsPerspective()) 04979 pNewAttr->MakePerspective(); 04980 04981 INT32 StartTransparency = 255 - (INT32)(((double)(255 - *pStartTransp)) * TransparencyScale); 04982 INT32 EndTransparency = 255 - (INT32)(((double)(255 - *pEndTransp)) * TransparencyScale); 04983 04984 DocColour colorStart(StartTransparency, StartTransparency, StartTransparency); 04985 DocColour colorEnd1(EndTransparency, EndTransparency, EndTransparency); 04986 pNewAttr->SetStartColour(&colorStart); 04987 pNewAttr->SetEndColour(&colorEnd1); 04988 } 04989 04990 return(pNewAttr); 04991 }
|
|
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path.
Reimplemented from FillGeometryAttribute. Definition at line 5025 of file fillval.cpp. 05026 { 05027 // Taken out of WEBSTER Neville 6/8/97 05028 // Taken out by vector stroking code Neville 2/10/97 05029 #ifdef VECTOR_STROKING 05030 if (pMoulder == NULL) 05031 return(NULL); 05032 05033 FillGeometryAttribute *pCopy = (FillGeometryAttribute *) GetRuntimeClass()->CreateObject(); 05034 if (pCopy != NULL) 05035 { 05036 // Copy this object's values across 05037 *pCopy = *this; 05038 05039 // And mould all of the geometry points across 05040 JCW_MOULDPOINT(pCopy, StartPoint); 05041 JCW_MOULDPOINT(pCopy, EndPoint); 05042 05043 if (IsPerspective()) 05044 { 05045 // If it's perspectivised, just map all the points and hope for the best 05046 JCW_MOULDPOINT(pCopy, EndPoint2); 05047 JCW_MOULDPOINT(pCopy, EndPoint3); 05048 } 05049 else 05050 { 05051 // Otherwise, we have mapped the start/end points, and we pass NULL in for 05052 // the remaining points so that they are re-generated to get the fill going 05053 // in the start->end direction (because the fill direction is not controlled 05054 // by the start->end line, but by the end->end2 line) 05055 pCopy->SetEndPoint2(NULL); 05056 pCopy->SetEndPoint3(NULL); 05057 } 05058 05059 ERROR3IF(TransScale < 0.0 || TransScale > 1.0, "Out of range TransScale parameter"); 05060 if (TransScale >= 0.0 && TransScale < 1.0) 05061 { 05062 JCW_MOULDTRANS(pCopy, StartTransp); 05063 JCW_MOULDTRANS(pCopy, EndTransp); 05064 } 05065 } 05066 return(pCopy); 05067 05068 #else 05069 return NULL; 05070 #endif // VECTOR_STROKING 05071 }
|
|
Removes perspective from this fill.
Reimplemented from FillGeometryAttribute. Definition at line 4937 of file fillval.cpp.
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 4868 of file fillval.cpp. 04869 { 04870 if (Pos == NULL) 04871 { 04872 EndPoint2 = MakeLineAtAngle(StartPoint, EndPoint, 90); 04873 } 04874 else 04875 EndPoint2 = *Pos; 04876 }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 4890 of file fillval.cpp. 04891 { 04892 if (Pos == NULL) 04893 EndPoint3 = MakeLineAtAngle(*GetEndPoint(), *GetEndPoint2(), 90); 04894 else 04895 EndPoint3 = *Pos; 04896 }
|
|
|
|
|
|
|