#include <fillval.h>
Inheritance diagram for ConicalTranspFillAttribute:
Public Member Functions | |
ConicalTranspFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrConicalFill node from this graduated fill attribute. | |
virtual BOOL | IsAConicalFill () |
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 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 INT32 | GetGeometryShape () |
Definition at line 1241 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 5481 of file fillval.cpp.
|
|
Find the absolute position in geometry coordinate space for the given parameter.
Reimplemented from GradTranspFillAttribute. Definition at line 5528 of file fillval.cpp. 05529 { 05530 // Here we calculate a circular coordinate space 05531 return PathUtil::PointOnSemiCircle(StartPoint,EndPoint,(double)pos); 05532 }
|
|
Find the parameter for the closest point to c on this geometry.
Reimplemented from GradTranspFillAttribute. Definition at line 5549 of file fillval.cpp. 05550 { 05551 // ok we're a linear geometry so find the closest point to a line type of thing. 05552 // use a handy util written by that other fab bloke called Mike. 05553 DocCoord Coords[2]; 05554 Coords[0] = StartPoint; 05555 Coords[1] = EndPoint; 05556 double p; 05557 PathUtil::SqrDistanceToSemiCircle(Coords, c, &p); 05558 return (float)p; 05559 }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1254 of file fillval.h. 01254 { return(FILLSHAPE_CONICAL); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 1248 of file fillval.h. 01248 { return TRUE; }
|
|
Make a AttrConicalFill node from this graduated fill attribute.
Reimplemented from AttributeValue. Definition at line 5498 of file fillval.cpp. 05499 { 05500 // Create new attribute node 05501 AttrConicalTranspFill *pAttr = new AttrConicalTranspFill; 05502 if (pAttr==NULL) 05503 // error message has already been set by new 05504 return NULL; 05505 05506 // Copy attribute value into the new node. 05507 pAttr->GetAttributeValue()->SimpleCopy(this); 05508 05509 // Return the new node 05510 return pAttr; 05511 }
|
|
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. Definition at line 5581 of file fillval.cpp. 05582 { 05583 UINT32 *pStartTransp = GetStartTransp(); 05584 UINT32 *pEndTransp = GetEndTransp(); 05585 05586 if(pStartTransp == NULL || pEndTransp == NULL) 05587 return NULL; 05588 05589 ConicalFillAttribute *pNewAttr = new ConicalFillAttribute; 05590 if (pNewAttr != NULL) 05591 { 05592 pNewAttr->SetStartPoint(GetStartPoint()); 05593 pNewAttr->SetEndPoint(GetEndPoint()); 05594 05595 INT32 StartTransparency = 255 - (INT32)(((double)(255 - *pStartTransp)) * TransparencyScale); 05596 INT32 EndTransparency = 255 - (INT32)(((double)(255 - *pEndTransp)) * TransparencyScale); 05597 05598 DocColour colorStart(StartTransparency, StartTransparency, StartTransparency); 05599 DocColour colorEnd1(EndTransparency, EndTransparency, EndTransparency); 05600 pNewAttr->SetStartColour(&colorStart); 05601 pNewAttr->SetEndColour(&colorEnd1); 05602 } 05603 05604 return(pNewAttr); 05605 }
|