ConicalFillAttribute Class Reference

Specifies a conical fill attribute for an object, including the vector that defines the centre of the cone, and the angle of the fill. More...

#include <fillval.h>

Inheritance diagram for ConicalFillAttribute:

GradFillAttribute ColourFillAttribute FillGeometryAttribute AttributeValue CCObject SimpleCCObject List of all members.

Public Member Functions

 ConicalFillAttribute ()
 Default Constuctor for fill attribute values.
virtual NodeAttributeMakeNode ()
 Make a AttrConicalFill node from this graduated fill attribute.
virtual DocCoord GetGeometryCoord (float pos) const
 Find the absolute position in geometry coordinate space for the given parameter.
virtual float GetGeometryParam (const DocCoord &c) const
 Find the parameter for the closest point to c on this geometry.
virtual BOOL IsAConicalFill ()
virtual INT32 GetGeometryShape ()

Detailed Description

Specifies a conical fill attribute for an object, including the vector that defines the centre of the cone, and the angle of the fill.

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

Definition at line 608 of file fillval.h.


Constructor & Destructor Documentation

ConicalFillAttribute::ConicalFillAttribute  ) 
 

Default Constuctor for fill attribute values.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
6/9/94
See also:
AttrFillGeometry::AttrFillGeometry

Definition at line 1971 of file fillval.cpp.

01972 {
01973 }


Member Function Documentation

DocCoord ConicalFillAttribute::GetGeometryCoord float  pos  )  const [virtual]
 

Find the absolute position in geometry coordinate space for the given parameter.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/3/97
Parameters:
pos = a parameter between 0 and 1 [INPUTS]
Returns:
A coordinate which relates the input parameter to a coordinate space on this geometry. For instance a linear fill would have a linear parameter space, 0 at the start coordinate, increasing to 1 at the end coordinate

Reimplemented from GradFillAttribute.

Definition at line 2019 of file fillval.cpp.

02020 {
02021     // Here we calculate a circular coordinate space
02022     return PathUtil::PointOnSemiCircle(StartPoint,EndPoint,(double)pos);
02023 }

float ConicalFillAttribute::GetGeometryParam const DocCoord c  )  const [virtual]
 

Find the parameter for the closest point to c on this geometry.

Author:
Mike_Kenny (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/3/97
Parameters:
c = a coordinate [INPUTS]
Returns:
A parameter p, 0<=p<=1, such that GetGeometryCoord(p) is the closest coordinate in the geometry to the input c.

Reimplemented from GradFillAttribute.

Definition at line 2040 of file fillval.cpp.

02041 {
02042     // ok we're a linear geometry so find the closest point to a line type of thing.
02043     // use a handy util written by that other fab bloke called Mike.
02044     DocCoord Coords[2];
02045     Coords[0] = StartPoint;
02046     Coords[1] = EndPoint;
02047     double p;
02048     PathUtil::SqrDistanceToSemiCircle(Coords, c, &p);
02049     return (float)p;
02050 }

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

Reimplemented from FillGeometryAttribute.

Definition at line 619 of file fillval.h.

00619 { return(FILLSHAPE_CONICAL); }

virtual BOOL ConicalFillAttribute::IsAConicalFill  )  [inline, virtual]
 

Reimplemented from FillGeometryAttribute.

Definition at line 618 of file fillval.h.

00618 { return TRUE; }

NodeAttribute * ConicalFillAttribute::MakeNode  )  [virtual]
 

Make a AttrConicalFill node from this graduated fill attribute.

Author:
Will_Cowling (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/8/94
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 1988 of file fillval.cpp.

01989 {
01990     // Create new attribute node
01991     AttrConicalFill *pAttr = new AttrConicalColourFill;
01992     if (pAttr==NULL)
01993         // error message has already been set by new
01994         return NULL;
01995 
01996     // Copy attribute value into the new node.
01997     pAttr->GetAttributeValue()->SimpleCopy(this);
01998 
01999     // Return the new node
02000     return pAttr;
02001 }


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