#include <fillval.h>
Inheritance diagram for ThreeColTranspFillAttribute:
Public Member Functions | |
ThreeColTranspFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual INT32 | operator== (const FillGeometryAttribute &Attrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrThreeColFill 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 UINT32 * | GetEndTransp2 () |
virtual void | SetEndTransp2 (UINT32 *NewTransp) |
Sets the second colour 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 | IsAThreeColFill () |
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 BOOL | SupportsFillRamps () |
virtual INT32 | GetGeometryShape () |
Public Attributes | |
DocCoord | EndPoint2 |
DocCoord | EndPoint3 |
BOOL | IsPersp |
UINT32 | EndTransp2 |
Definition at line 1533 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 7546 of file fillval.cpp. 07547 { 07548 IsPersp = FALSE; 07549 07550 EndPoint2 = DocCoord(0,0); 07551 EndTransp2 = 128; 07552 }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1543 of file fillval.h. 01543 { return &EndPoint2; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1545 of file fillval.h. 01545 { return &EndPoint3; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1548 of file fillval.h. 01548 { return &EndTransp2; }
|
|
Reimplemented from FillGeometryAttribute. Reimplemented in FourColTranspFillAttribute. Definition at line 1560 of file fillval.h. 01560 { return(FILLSHAPE_3POINT); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1555 of file fillval.h. 01555 { return TRUE; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1551 of file fillval.h. 01551 { return IsPersp; }
|
|
Make a AttrThreeColFill node from this graduated fill attribute.
Reimplemented from AttributeValue. Reimplemented in FourColTranspFillAttribute. Definition at line 7591 of file fillval.cpp. 07592 { 07593 // Create new attribute node 07594 AttrThreeColTranspFill *pAttr = new AttrThreeColTranspFill; 07595 if (pAttr==NULL) 07596 // error message has already been set by new 07597 return NULL; 07598 07599 // Copy attribute value into the new node. 07600 pAttr->GetAttributeValue()->SimpleCopy(this); 07601 07602 // Return the new node 07603 return pAttr; 07604 }
|
|
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 7681 of file fillval.cpp. 07682 { 07683 IsPersp = TRUE; 07684 07685 INT32 dx1 = EndPoint.x - StartPoint.x; 07686 INT32 dx2 = EndPoint2.x - StartPoint.x; 07687 07688 INT32 dy1 = EndPoint.y - StartPoint.y; 07689 INT32 dy2 = EndPoint2.y - StartPoint.y; 07690 07691 DocCoord Pos3(StartPoint.x + dx1 + dx2, StartPoint.y + dy1 + dy2); 07692 SetEndPoint3(&Pos3); 07693 }
|
|
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. Reimplemented in FourColTranspFillAttribute. Definition at line 7732 of file fillval.cpp. 07733 { 07734 UINT32 *pStartTransp = GetStartTransp(); 07735 UINT32 *pEndTransp = GetEndTransp(); 07736 UINT32 *pEndTransp2 = GetEndTransp2(); 07737 07738 if(pStartTransp == NULL || pEndTransp == NULL || pEndTransp2 == NULL) 07739 return NULL; 07740 07741 ThreeColFillAttribute *pNewAttr = new ThreeColFillAttribute; 07742 if (pNewAttr != NULL) 07743 { 07744 pNewAttr->SetStartPoint(GetStartPoint()); 07745 pNewAttr->SetEndPoint(GetEndPoint()); 07746 pNewAttr->SetEndPoint2(GetEndPoint2()); 07747 pNewAttr->SetEndPoint3(GetEndPoint3()); 07748 07749 if(IsPerspective()) 07750 pNewAttr->MakePerspective(); 07751 07752 INT32 StartTransparency = 255 - (INT32)(((double)(255 - *pStartTransp)) * TransparencyScale); 07753 INT32 EndTransparency = 255 - (INT32)(((double)(255 - *pEndTransp)) * TransparencyScale); 07754 INT32 EndTransparency2 = 255 - (INT32)(((double)(255 - *pEndTransp2)) * TransparencyScale); 07755 07756 DocColour colorStart(StartTransparency, StartTransparency, StartTransparency); 07757 DocColour colorEnd1(EndTransparency, EndTransparency, EndTransparency); 07758 DocColour colorEnd2(EndTransparency2, EndTransparency2, EndTransparency2); 07759 pNewAttr->SetStartColour(&colorStart); 07760 pNewAttr->SetEndColour(&colorEnd1); 07761 pNewAttr->SetEndColour2(&colorEnd2); 07762 } 07763 07764 return(pNewAttr); 07765 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from GradTranspFillAttribute. Reimplemented in FourColTranspFillAttribute. Definition at line 7570 of file fillval.cpp. 07571 { 07572 ThreeColTranspFillAttribute* pAttrib = (ThreeColTranspFillAttribute*) &Attrib; 07573 07574 return(GradTranspFillAttribute::operator==(Attrib) && (EndTransp2 == pAttrib->EndTransp2)); 07575 }
|
|
Removes perspective from this fill.
Reimplemented from FillGeometryAttribute. Definition at line 7706 of file fillval.cpp.
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 7617 of file fillval.cpp. 07618 { 07619 if (Pos == NULL) 07620 EndPoint2 = MakeLineAtAngle(*GetStartPoint(), *GetEndPoint(), 90); 07621 else 07622 EndPoint2 = *Pos; 07623 }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 7637 of file fillval.cpp. 07638 { 07639 if (Pos == NULL) 07640 EndPoint3 = MakeLineAtAngle(*GetEndPoint(), *GetEndPoint2(), 90); 07641 else 07642 EndPoint3 = *Pos; 07643 }
|
|
Sets the second colour of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 7657 of file fillval.cpp. 07658 { 07659 if (NewTransp == NULL) 07660 EndTransp2 = 128; 07661 else 07662 EndTransp2 = *NewTransp; 07663 }
|
|
Reimplemented from GradTranspFillAttribute. Definition at line 1558 of file fillval.h. 01558 { return FALSE; }
|
|
|
|
|
|
|
|
|