#include <fillval.h>
Inheritance diagram for LinearFillAttribute:
Public Member Functions | |
LinearFillAttribute () | |
Default Constuctor for fill attribute values. | |
virtual NodeAttribute * | MakeNode () |
Make a AttrLinearFill node from this graduated fill attribute. | |
virtual DocCoord * | GetEndPoint2 () |
virtual DocCoord * | GetEndPoint3 () |
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 | IsALinearFill () |
virtual INT32 | GetGeometryShape () |
virtual AttributeValue * | MouldIntoStroke (PathStrokerVector *pMoulder, double TransScale=1.0) |
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path. | |
Public Attributes | |
DocCoord | EndPoint2 |
DocCoord | EndPoint3 |
BOOL | IsPersp |
Definition at line 503 of file fillval.h.
|
Default Constuctor for fill attribute values.
Definition at line 1441 of file fillval.cpp.
|
|
Reimplemented from FillGeometryAttribute. Definition at line 511 of file fillval.h. 00511 { return &EndPoint2; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 512 of file fillval.h. 00512 { return &EndPoint3; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 521 of file fillval.h. 00521 { return(FILLSHAPE_LINEAR); }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 520 of file fillval.h. 00520 { return TRUE; }
|
|
Reimplemented from FillGeometryAttribute. Definition at line 516 of file fillval.h. 00516 { return IsPersp; }
|
|
Make a AttrLinearFill node from this graduated fill attribute.
Reimplemented from AttributeValue. Definition at line 1459 of file fillval.cpp. 01460 { 01461 // Create new attribute node 01462 AttrLinearFill *pAttr = new AttrLinearColourFill; 01463 if (pAttr==NULL) 01464 // error message has already been set by new 01465 return NULL; 01466 01467 // Copy attribute value into the new node. 01468 pAttr->GetAttributeValue()->SimpleCopy(this); 01469 01470 // Return the new node 01471 return pAttr; 01472 }
|
|
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 1532 of file fillval.cpp. 01533 { 01534 IsPersp = TRUE; 01535 01536 INT32 dx1 = EndPoint.x - StartPoint.x; 01537 INT32 dx2 = EndPoint2.x - StartPoint.x; 01538 01539 INT32 dy1 = EndPoint.y - StartPoint.y; 01540 INT32 dy2 = EndPoint2.y - StartPoint.y; 01541 01542 DocCoord Pos3(StartPoint.x + dx1 + dx2, StartPoint.y + dy1 + dy2); 01543 SetEndPoint3(&Pos3); 01544 }
|
|
Helper function for the PathStrokerVector class, which "moulds" clipart subtrees to lie along an arbitrary path.
Reimplemented from FillGeometryAttribute. Definition at line 1594 of file fillval.cpp. 01595 { 01596 // Taken out of WEBSTER Neville 6/8/97 01597 // Taken out by vector stroking code Neville 2/10/97 01598 #ifdef VECTOR_STROKING 01599 if (pMoulder == NULL) 01600 return(NULL); 01601 01602 FillGeometryAttribute *pCopy = (FillGeometryAttribute *) GetRuntimeClass()->CreateObject(); 01603 if (pCopy != NULL) 01604 { 01605 // Copy this object's values across 01606 *pCopy = *this; 01607 01608 // And mould all of the geometry points across 01609 JCW_MOULDPOINT(pCopy, StartPoint); 01610 JCW_MOULDPOINT(pCopy, EndPoint); 01611 01612 if (IsPerspective()) 01613 { 01614 // If it's perspectivised, just map all the points and hope for the best 01615 JCW_MOULDPOINT(pCopy, EndPoint2); 01616 JCW_MOULDPOINT(pCopy, EndPoint3); 01617 } 01618 else 01619 { 01620 // Otherwise, we have mapped the start/end points, and we pass NULL in for 01621 // the remaining points so that they are re-generated to get the fill going 01622 // in the start->end direction (because the fill direction is not controlled 01623 // by the start->end line, but by the end->end2 line) 01624 pCopy->SetEndPoint2(NULL); 01625 pCopy->SetEndPoint3(NULL); 01626 } 01627 } 01628 return(pCopy); 01629 #else 01630 return NULL; 01631 #endif // VECTOR_STROKING 01632 }
|
|
Removes perspective from this fill.
Reimplemented from FillGeometryAttribute. Definition at line 1557 of file fillval.cpp.
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 1486 of file fillval.cpp. 01487 { 01488 if (Pos == NULL) 01489 { 01490 EndPoint2 = MakeLineAtAngle(StartPoint, EndPoint, 90); 01491 } 01492 else 01493 { 01494 EndPoint2 = *Pos; 01495 } 01496 }
|
|
Sets the End Point of this fill.
Reimplemented from FillGeometryAttribute. Definition at line 1510 of file fillval.cpp. 01511 { 01512 if (Pos == NULL) 01513 EndPoint3 = MakeLineAtAngle(*GetEndPoint(), *GetEndPoint2(), 90); 01514 else 01515 EndPoint3 = *Pos; 01516 }
|
|
|
|
|
|
|