#include <fillval.h>
Inheritance diagram for RadialFillAttribute:
Public Member Functions | |
RadialFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual void | SimpleCopy (AttributeValue *) |
See AttributeValue::SimpleCopy. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrRadialFill node from this graduated fill attribute. | |
virtual FillGeometryAttribute & | operator= (FillGeometryAttribute &Attrib) |
A virtual assignment operator. | |
virtual INT32 | operator== (const FillGeometryAttribute &Attrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual BOOL | IsAspectLocked () |
virtual void | SetAspectLock (BOOL Locked) |
void | MakeCircular () |
Forces this radial fill into a circular one. | |
void | MakeElliptical () |
Forces this radial fill into an elliptical one. | |
BOOL | IsCircular () |
BOOL | IsElliptical () |
virtual DocCoord * | GetEndPoint2 () |
virtual DocCoord * | GetEndPoint3 () |
virtual void | SetEndPoint2 (DocCoord *Pos) |
Sets the End Point of this fill. | |
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 | IsARadialFill () |
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 |
Private Attributes | |
BOOL | Circular |
Definition at line 547 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 1652 of file fillval.cpp. 01653 { 01654 Circular = FALSE; 01655 IsPersp = FALSE; 01656 01657 EndPoint2 = DocCoord(0,0); 01658 }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 570 of file fillval.h. 00570 { return &EndPoint2; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 571 of file fillval.h. 00571 { return &EndPoint3; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 580 of file fillval.h. 00580 { return(Circular ? FILLSHAPE_CIRCULAR : FILLSHAPE_ELLIPTICAL); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 579 of file fillval.h. 00579 { return TRUE; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 559 of file fillval.h. 00559 { return Circular; }
|
|
Definition at line 567 of file fillval.h. 00567 { return Circular; }
|
|
Definition at line 568 of file fillval.h. 00568 { return !Circular; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 575 of file fillval.h. 00575 { return IsPersp; }
|
|
Forces this radial fill into a circular one.
Definition at line 1804 of file fillval.cpp. 01805 { 01806 // Set a flag so we can tell we're circular 01807 Circular = TRUE; 01808 01809 // Make sure the second end point is on the same radius as the other 01810 EndPoint2 = MakeLineAtAngle(StartPoint, EndPoint, 90); 01811 }
|
|
Forces this radial fill into an elliptical one.
Definition at line 1823 of file fillval.cpp. 01824 { 01825 // Just clear the flag, so we don't try and lock the secondary point 01826 Circular = FALSE; 01827 }
|
|
Make a AttrRadialFill node from this graduated fill attribute.
Reimplemented from AttributeValue. Definition at line 1673 of file fillval.cpp. 01674 { 01675 // Create new attribute node 01676 AttrRadialFill *pAttr = new AttrRadialColourFill; 01677 if (pAttr==NULL) 01678 // error message has already been set by new 01679 return NULL; 01680 01681 // Copy attribute value into the new node. 01682 pAttr->GetAttributeValue()->SimpleCopy(this); 01683 01684 // Return the new node 01685 return pAttr; 01686 }
|
|
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 1862 of file fillval.cpp. 01863 { 01864 IsPersp = TRUE; 01865 01866 INT32 dx1 = EndPoint.x - StartPoint.x; 01867 INT32 dx2 = EndPoint2.x - StartPoint.x; 01868 01869 INT32 dy1 = EndPoint.y - StartPoint.y; 01870 INT32 dy2 = EndPoint2.y - StartPoint.y; 01871 01872 DocCoord Pos3(StartPoint.x + dx1 + dx2, StartPoint.y + dy1 + dy2); 01873 SetEndPoint3(&Pos3); 01874 }
|
|
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path.
Reimplemented from FillGeometryAttribute. Definition at line 1923 of file fillval.cpp. 01924 { 01925 // Taken out of WEBSTER Neville 6/8/97 01926 // Taken out by vector stroking code Neville 2/10/97 01927 #ifdef VECTOR_STROKING 01928 if (pMoulder == NULL) 01929 return(NULL); 01930 01931 RadialFillAttribute *pCopy = (RadialFillAttribute *) GetRuntimeClass()->CreateObject(); 01932 if (pCopy != NULL) 01933 { 01934 // Copy this object's values across 01935 *pCopy = *this; 01936 01937 // Make sure it's defined as an elliptical fill, to ensure all points are set up correctly 01938 pCopy->MakeElliptical(); 01939 01940 // And mould all of the geometry points across 01941 JCW_MOULDPOINT(pCopy, StartPoint); 01942 JCW_MOULDPOINT(pCopy, EndPoint); 01943 JCW_MOULDPOINT(pCopy, EndPoint2); 01944 JCW_MOULDPOINT(pCopy, EndPoint3); 01945 } 01946 return(pCopy); 01947 #else 01948 return NULL; 01949 #endif // VECTOR_STROKING 01950 }
|
|
A virtual assignment operator.
Reimplemented from GradFillAttribute. Definition at line 1719 of file fillval.cpp. 01720 { 01721 return GradFillAttribute::operator=(Attrib); 01722 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from GradFillAttribute. Definition at line 1740 of file fillval.cpp. 01741 { 01742 if (GetRuntimeClass() != Attrib.GetRuntimeClass()) 01743 return FALSE; 01744 01745 RadialFillAttribute* pAttrib = (RadialFillAttribute*)&Attrib; 01746 01747 if (IsPerspective()) 01748 { 01749 if (!pAttrib->IsPerspective()) 01750 return FALSE; 01751 01752 if (EndPoint3 != pAttrib->EndPoint3) 01753 return FALSE; 01754 } 01755 01756 // check the colour ramps match 01757 if (!SameColourRampAs(pAttrib->GetColourRamp())) 01758 return FALSE; 01759 01760 // Are the Colours and Control points all the same ? 01761 return ( 01762 01763 Colour == pAttrib->Colour && 01764 EndColour == pAttrib->EndColour && 01765 01766 StartPoint == pAttrib->StartPoint && 01767 EndPoint == pAttrib->EndPoint && 01768 EndPoint2 == pAttrib->EndPoint2 && 01769 01770 Circular == pAttrib->Circular 01771 ); 01772 }
|
|
Removes perspective from this fill.
Reimplemented from FillGeometryAttribute. Definition at line 1887 of file fillval.cpp.
|
|
Reimplemented from FillGeometryAttribute. Definition at line 560 of file fillval.h. 00560 { Circular = Locked; }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 1699 of file fillval.cpp. 01700 { 01701 if (Pos == NULL) 01702 EndPoint2 = DocCoord(0,0); 01703 else 01704 EndPoint2 = *Pos; 01705 }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 1840 of file fillval.cpp. 01841 { 01842 if (Pos == NULL) 01843 EndPoint3 = MakeLineAtAngle(*GetEndPoint(), *GetEndPoint2(), 90); 01844 else 01845 EndPoint3 = *Pos; 01846 }
|
|
See AttributeValue::SimpleCopy.
Reimplemented from GradFillAttribute. Definition at line 1787 of file fillval.cpp. 01788 { 01789 // Base class does most of the work... 01790 GradFillAttribute::SimpleCopy(pValue); 01791 }
|
|
|
|
|
|
|
|
|