SquareFillAttribute Class Reference

Specifies a Square graduated fill for an object, including the start and end points. More...

#include <fillval.h>

Inheritance diagram for SquareFillAttribute:

GradFillAttribute ColourFillAttribute FillGeometryAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 SquareFillAttribute ()
 Default Constuctor for fill attribute values.
virtual NodeAttributeMakeNode ()
 Make a AttrSquareFill node from this graduated fill attribute.
virtual DocCoordGetEndPoint2 ()
virtual DocCoordGetEndPoint3 ()
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 IsASquareFill ()
virtual INT32 GetGeometryShape ()

Public Attributes

DocCoord EndPoint2
DocCoord EndPoint3
BOOL IsPersp

Detailed Description

Specifies a Square graduated fill for an object, including the start and end points.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
18/07/94
See also:
GradFillAttribute

Definition at line 635 of file fillval.h.


Constructor & Destructor Documentation

SquareFillAttribute::SquareFillAttribute  ) 
 

Default Constuctor for fill attribute values.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
See also:
AttrFillGeometry::AttrFillGeometry

Definition at line 2070 of file fillval.cpp.

02071 {
02072     IsPersp = FALSE;
02073 
02074     EndPoint2 = DocCoord(0,0);
02075 }


Member Function Documentation

virtual DocCoord* SquareFillAttribute::GetEndPoint2  )  [inline, virtual]
 

Reimplemented from FillGeometryAttribute.

Definition at line 643 of file fillval.h.

00643 { return &EndPoint2; }

virtual DocCoord* SquareFillAttribute::GetEndPoint3  )  [inline, virtual]
 

Reimplemented from FillGeometryAttribute.

Definition at line 644 of file fillval.h.

00644 { return &EndPoint3; }

virtual INT32 SquareFillAttribute::GetGeometryShape  )  [inline, virtual]
 

Reimplemented from FillGeometryAttribute.

Definition at line 653 of file fillval.h.

00653 { return(FILLSHAPE_DIAMOND); }

virtual BOOL SquareFillAttribute::IsASquareFill  )  [inline, virtual]
 

Reimplemented from FillGeometryAttribute.

Definition at line 652 of file fillval.h.

00652 { return TRUE; }

virtual BOOL SquareFillAttribute::IsPerspective  )  [inline, virtual]
 

Reimplemented from FillGeometryAttribute.

Definition at line 648 of file fillval.h.

00648 { return IsPersp; }

NodeAttribute * SquareFillAttribute::MakeNode  )  [virtual]
 

Make a AttrSquareFill node from this graduated fill attribute.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Returns:
Pointer to the new node, or NULL if out of memory.

Errors: Out of memory

See also:
AttributeValue::MakeNode

Reimplemented from AttributeValue.

Definition at line 2090 of file fillval.cpp.

02091 {
02092     // Create new attribute node
02093     AttrSquareFill *pAttr = new AttrSquareColourFill;
02094     if (pAttr==NULL)
02095         // error message has already been set by new
02096         return NULL;
02097 
02098     // Copy attribute value into the new node.
02099     pAttr->GetAttributeValue()->SimpleCopy(this);
02100 
02101     // Return the new node
02102     return pAttr;
02103 }

void SquareFillAttribute::MakePerspective  )  [virtual]
 

Make the fill perspectived. This should be called just before it is transformed by the moulder, so it can validate the 4th control point.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
- [INPUTS]

Reimplemented from FillGeometryAttribute.

Definition at line 2159 of file fillval.cpp.

02160 {
02161     IsPersp = TRUE;
02162 
02163     INT32 dx1 = EndPoint.x - StartPoint.x;
02164     INT32 dx2 = EndPoint2.x - StartPoint.x;
02165 
02166     INT32 dy1 = EndPoint.y - StartPoint.y;
02167     INT32 dy2 = EndPoint2.y - StartPoint.y;
02168 
02169     DocCoord Pos3(StartPoint.x + dx1 + dx2, StartPoint.y + dy1 + dy2);
02170     SetEndPoint3(&Pos3);
02171 }

void SquareFillAttribute::RemovePerspective  )  [virtual]
 

Removes perspective from this fill.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
- [INPUTS]

Reimplemented from FillGeometryAttribute.

Definition at line 2184 of file fillval.cpp.

02185 {
02186     IsPersp = FALSE;
02187 }

void SquareFillAttribute::SetEndPoint2 DocCoord Pos  )  [virtual]
 

Sets the End Point of this fill.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
- [INPUTS]

Reimplemented from FillGeometryAttribute.

Definition at line 2117 of file fillval.cpp.

02118 {
02119     if (Pos == NULL)
02120         EndPoint2 = MakeLineAtAngle(*GetStartPoint(), *GetEndPoint(), 90);
02121     else
02122         EndPoint2 = *Pos;
02123 }

void SquareFillAttribute::SetEndPoint3 DocCoord Pos  )  [virtual]
 

Sets the End Point of this fill.

Author:
Gerry_Iles (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/8/96
Parameters:
- [INPUTS]

Reimplemented from FillGeometryAttribute.

Definition at line 2137 of file fillval.cpp.

02138 {
02139     if (Pos == NULL)
02140         EndPoint3 = MakeLineAtAngle(*GetEndPoint(), *GetEndPoint2(), 90);
02141     else
02142         EndPoint3 = *Pos;
02143 }


Member Data Documentation

DocCoord SquareFillAttribute::EndPoint2
 

Definition at line 656 of file fillval.h.

DocCoord SquareFillAttribute::EndPoint3
 

Definition at line 657 of file fillval.h.

BOOL SquareFillAttribute::IsPersp
 

Definition at line 659 of file fillval.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:01:23 2007 for Camelot by  doxygen 1.4.4