#include <fillval.h>
Inheritance diagram for ColourFillAttribute:
Public Member Functions | |
ColourFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual void | Restore (RenderRegion *, BOOL) |
Restores the fill type attribute for the given render region. i.e. all paths filled will now be filled with this fill attribute. | |
virtual void | Render (RenderRegion *, BOOL Temp=FALSE) |
Sets the fill geometry attribute for the given render region. i.e. all paths filled will now be filled with this fill geometry. | |
virtual FillGeometryAttribute & | operator= (FillGeometryAttribute &Attrib) |
Make the Attribute the same as the other. | |
virtual INT32 | operator== (const FillGeometryAttribute &Attrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual DocColour * | GetStartColour () |
virtual void | SetStartColour (DocColour *NewCol) |
Sets the Start colour of this fill. | |
virtual BOOL | IsAColourFill () |
virtual BOOL | ContainsNamedColour () |
Static Public Member Functions | |
static BOOL | Init () |
Registers fill type attribute, and provides a default attribute to give transparent flat fills, i.e. actually not filled at all. | |
Public Attributes | |
DocColour | Colour |
Definition at line 366 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 674 of file fillval.cpp.
|
|
Definition at line 911 of file fillval.cpp. 00912 { 00913 // check through all the colours and see if they are named 00914 00915 DocColour* pColour = GetStartColour(); 00916 if (pColour != NULL) 00917 { 00918 if (pColour->IsNamed()) 00919 return TRUE; 00920 } 00921 pColour = GetEndColour(); 00922 if (pColour != NULL) 00923 { 00924 if (pColour->IsNamed()) 00925 return TRUE; 00926 } 00927 pColour = GetEndColour2(); 00928 if (pColour != NULL) 00929 { 00930 if (pColour->IsNamed()) 00931 return TRUE; 00932 } 00933 pColour = GetEndColour3(); 00934 if (pColour != NULL) 00935 { 00936 if (pColour->IsNamed()) 00937 return TRUE; 00938 } 00939 00940 return FALSE; 00941 }
|
|
Reimplemented from FillGeometryAttribute. Reimplemented in BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 381 of file fillval.h. 00381 { return &Colour; }
|
|
Registers fill type attribute, and provides a default attribute to give transparent flat fills, i.e. actually not filled at all.
Reimplemented from SimpleCCObject. Reimplemented in StrokeColourAttribute. Definition at line 693 of file fillval.cpp. 00694 { 00695 // Default to simple transparent fill colour 00696 FlatFillAttribute *pAttr = new FlatFillAttribute; 00697 if (pAttr==NULL) 00698 // just return FALSE, as the error message was set by new 00699 return FALSE; 00700 00701 // pAttr->Colour = AttributeManager::DefaultBlack; 00702 pAttr->Colour = DocColour(COLOUR_NONE); 00703 UINT32 ID = AttributeManager::RegisterDefaultAttribute(CC_RUNTIME_CLASS(NodeRenderableInk), 00704 pAttr); 00705 00706 ERROR2IF(ID == ATTR_BAD_ID, FALSE, "Bad ID when Initialising ColourFillAttribute"); 00707 ERROR2IF(ID != ATTR_FILLGEOMETRY, FALSE, "Incorrect ID for ColourFillAttribute"); 00708 00709 return TRUE; 00710 }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 384 of file fillval.h. 00384 { return TRUE; }
|
|
Make the Attribute the same as the other.
Reimplemented from FillGeometryAttribute. Reimplemented in GradFillAttribute, RadialFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 726 of file fillval.cpp. 00727 { 00728 if ( !FillAttrib.IsABitmapFill() && this->IsABitmapFill() ) 00729 { 00730 SetStartColour(NULL); 00731 SetEndColour(NULL); 00732 } 00733 else if ( FillAttrib.IsAFlatFill() && this->IsAGradFill() ) 00734 { 00735 SetStartColour(NULL); 00736 SetEndColour(FillAttrib.GetStartColour()); 00737 } 00738 else if ( FillAttrib.IsAFlatFill() && this->IsAFractalFill() ) 00739 { 00740 SetStartColour(NULL); 00741 SetEndColour(FillAttrib.GetStartColour()); 00742 } 00743 else if ( FillAttrib.IsAGradFill() && this->IsAFlatFill() ) 00744 { 00745 SetStartColour(FillAttrib.GetEndColour()); 00746 SetEndColour(NULL); 00747 } 00748 else 00749 { 00750 SetStartColour(FillAttrib.GetStartColour()); 00751 SetEndColour(FillAttrib.GetEndColour()); 00752 SetEndColour2(FillAttrib.GetEndColour2()); 00753 SetEndColour3(FillAttrib.GetEndColour3()); 00754 } 00755 00756 // Copy the fills profile 00757 SetProfile (FillAttrib.GetProfile ()); 00758 00759 // Copy the control points 00760 SetStartPoint(FillAttrib.GetStartPoint()); 00761 SetEndPoint(FillAttrib.GetEndPoint()); 00762 SetEndPoint2(FillAttrib.GetEndPoint2()); 00763 00764 // Bitmap Virtual points 00765 if ( FillAttrib.IsAKindOfBitmapFill() && 00766 !this->IsAKindOfBitmapFill() ) 00767 { 00768 DocCoord Start = *FillAttrib.GetStartPoint(); 00769 DocCoord End = *FillAttrib.GetEndPoint(); 00770 DocCoord End2 = *FillAttrib.GetEndPoint2(); 00771 00772 GetBitmapVirtualPoints( Start, End, End2, 00773 GetStartPoint(), GetEndPoint(), GetEndPoint2()); 00774 } 00775 else if ( !FillAttrib.IsAKindOfBitmapFill() && 00776 this->IsAKindOfBitmapFill() ) 00777 { 00778 GetBitmapRealPoints(*GetStartPoint(), *GetEndPoint(), *GetEndPoint2(), 00779 GetStartPoint(), GetEndPoint(), GetEndPoint2()); 00780 } 00781 00782 if (FillAttrib.IsPerspective()) 00783 { 00784 MakePerspective(); 00785 SetEndPoint3(FillAttrib.GetEndPoint3()); 00786 } 00787 else 00788 { 00789 RemovePerspective(); 00790 } 00791 00792 // are both these fractal fills? 00793 if ( FillAttrib.IsAKindOfBitmapFill() && this->IsAKindOfBitmapFill()) 00794 { 00795 // are these bitmap items the same? 00796 if (FillAttrib.GetRuntimeClass() == this->GetRuntimeClass()) 00797 CopyBitmap(FillAttrib.GetBitmap()); 00798 } 00799 else 00800 CopyBitmap(FillAttrib.GetBitmap()); 00801 00802 SetTesselation(FillAttrib.GetTesselation()); 00803 SetAspectLock(FillAttrib.IsAspectLocked()); 00804 SetColourRamp(FillAttrib.GetColourRamp()); 00805 00806 return *this; 00807 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from FillGeometryAttribute. Reimplemented in GradFillAttribute, RadialFillAttribute, ThreeColFillAttribute, FourColFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 825 of file fillval.cpp. 00826 { 00827 if (GetRuntimeClass() != Attrib.GetRuntimeClass()) 00828 return FALSE; 00829 00830 return (Colour == ((ColourFillAttribute*)&Attrib)->Colour); 00831 }
|
|
Sets the fill geometry attribute for the given render region. i.e. all paths filled will now be filled with this fill geometry.
Implements FillGeometryAttribute. Reimplemented in BitmapFillAttribute, and StrokeColourAttribute. Definition at line 848 of file fillval.cpp. 00849 { 00850 pRegion->SetFillGeometry(this, Temp); 00851 }
|
|
Restores the fill type attribute for the given render region. i.e. all paths filled will now be filled with this fill attribute.
Implements FillGeometryAttribute. Reimplemented in BitmapFillAttribute, and StrokeColourAttribute. Definition at line 870 of file fillval.cpp. 00871 { 00872 pRegion->RestoreFillGeometry(this, Temp); 00873 }
|
|
Sets the Start colour of this fill.
Reimplemented from FillGeometryAttribute. Reimplemented in FlatFillAttribute, BitmapFillAttribute, NoiseFillAttribute, and FractalFillAttribute. Definition at line 886 of file fillval.cpp. 00887 { 00888 if (NewCol == NULL) 00889 { 00890 AttributeManager::FindDefaultColour(ColourManager::GetCurrentColourList(), 00891 _R(IDS_WHITENAME), &Colour); 00892 } 00893 else 00894 Colour = *NewCol; 00895 }
|
|
|