#include <moldshap.h>
Inheritance diagram for MouldTransform:
Public Member Functions | |
MouldTransform (MouldGeometry *pGeom) | |
MouldTransform constructor sets the internal shape pointer. | |
~MouldTransform () | |
MouldTransform destructor. | |
virtual void | Transform (DocCoord *Coords, INT32 NumCoords) |
Takes each coordinate from Coords in turn, transforming it by the defined mould and writing back the result. | |
virtual BOOL | IsInvertable () |
virtual BOOL | TransformPath (Path *const pSource, Path *pDestin) |
This function will create a destination path by transforming the coords in the source path. However, unlike MouldTransform::Transform() there is not a 1:1 correspondence between these points. ie this complex transform produces complex results. The output path can be much larger than the input. You could theoretically call the Transform function on the coordinates of the path. The nature of the transform (being none affine) will give you an inaccurate result for lines and an invalid result for curves. So its better to use this function for paths. I suppose the criteria is, if you dont mind a linear response in the output domain of what you are transforming, (such as simple transforms of grad fills) then you can use Transform() otherwise, use this function if you can represent your data as paths. | |
Private Attributes | |
MouldGeometry * | pMouldGeom |
Definition at line 200 of file moldshap.h.
|
MouldTransform constructor sets the internal shape pointer.
Definition at line 355 of file moldshap.cpp. 00356 { 00357 ERROR3IF(pGeom==NULL, "MouldTransform constructor passed a null shape"); 00358 00359 pMouldGeom = pGeom; 00360 TransFills = TRUE; 00361 TransLines = TRUE; 00362 00363 // FIXED16 a(1); 00364 // SetScaleFactor(a); 00365 }
|
|
MouldTransform destructor.
Definition at line 379 of file moldshap.cpp.
|
|
Implements TransformBase. Definition at line 209 of file moldshap.h. 00209 { return FALSE; }
|
|
Takes each coordinate from Coords in turn, transforming it by the defined mould and writing back the result.
Implements TransformBase. Definition at line 400 of file moldshap.cpp. 00401 { 00402 ERROR3IF(Coords==NULL, "MouldTransform::Transform() called with illegal coord pointer"); 00403 00404 for (INT32 i=0; i<NumCoords; i++) 00405 pMouldGeom->MouldPoint(Coords[i],Coords[i]); 00406 }
|
|
This function will create a destination path by transforming the coords in the source path. However, unlike MouldTransform::Transform() there is not a 1:1 correspondence between these points. ie this complex transform produces complex results. The output path can be much larger than the input. You could theoretically call the Transform function on the coordinates of the path. The nature of the transform (being none affine) will give you an inaccurate result for lines and an invalid result for curves. So its better to use this function for paths. I suppose the criteria is, if you dont mind a linear response in the output domain of what you are transforming, (such as simple transforms of grad fills) then you can use Transform() otherwise, use this function if you can represent your data as paths.
Definition at line 434 of file moldshap.cpp. 00435 { 00436 ERROR2IF(pSource==NULL,FALSE,"MouldTransform::TransformPath() called with a null source path"); 00437 ERROR2IF(pDestin==NULL,FALSE,"MouldTransform::TransformPath() called with a null source path"); 00438 00439 return pMouldGeom->MouldPathToPath(pSource,pDestin); 00440 }
|
|
Definition at line 213 of file moldshap.h. |