Mako 7.3.0 API
JawsMako::IStrokerTransform Class Referenceabstract

A transform for converting some or all stroked paths into plain filled paths. More...

#include <transforms.h>

Inheritance diagram for JawsMako::IStrokerTransform:

Public Member Functions

virtual void setTargetResolution (float resolution)=0
 Sets the target resolution (dpi) of the eventual consumer. In some situations the stroker will need to "flatten" sections of the path and this parameter will help the stroker decide how much error is allowable in such situations. The default is 300dpi.
 
virtual void setupForXPSStyleOutput ()=0
 Sets up the stroker transform for output to an XPS style consumer. More...
 
virtual void setupForPDFStyleOutput ()=0
 Sets up the stroker transform for output to a PDF style consumner. More...
 
virtual void setConvertAllStrokes (bool convert)=0
 Sets whether or not the stroker should convert all stroked paths into fills. The default is true.
 
virtual void setConvertForDashedStrokes (bool convert)=0
 Sets whether or not to convert paths with dashed strokes. The default is false but this is ignored if setConvertAllStrokes() has been set to true.
 
virtual void setConvertForNonTilingVisualOrImageStrokes (bool convert)=0
 Sets whether or not to convert paths with non-tiling visual or image brushes. The default is false but this is ignored if setConvertAllStrokes() has been set to true. This results in simpler processing for many consumers.
 
virtual void setConvertForMiterTreatment (IDOMPathNode::eStrokeMiterLimitTreatment treatment, bool convert=true)=0
 Sets whether or not the stroker should convert paths with the given miter treatment mode. Note that if this is set the stroker will not convert paths where the miters would not be seen, such as if none of the corners in the path are acute enough to generate miters longer than the threshold of the path. The default is false in all cases, but this is ignored if setConvertAllStrokes() has been set to true.
 
virtual void setMiterErrorThreshold (float maxError)=0
 Sets the approximate allowable amount of error, in pixels at the target resolution allowed for miter joins. This does not affect the result of converting a stroke to a filled path, but does affect whether or not to convert if setConvertForMiterTreatment() has been set to true for the applicable miter treatment method. It is designed to allow thin paths where miters would not be easily discernable to be left as is. The default is 0.0.
 
virtual void setConvertForLineCap (IDOMPathNode::eStrokeLineCap cap, bool convert=true)=0
 Sets whether or not strokes containing the given line cap type should be converted. In all cases the default is false, but this is ignored if setConvertAllStrokes() has been set to true.
 
virtual void setConvertForDashCap (IDOMPathNode::eStrokeLineCap cap, bool convert=true)=0
 Sets whether or not strokes containing the given dash cap type should be converted. In all cases the default is false, but this is ignored if setConvertAllStrokes() has been set to true.
 
virtual void setConvertForMismatchedCaps (bool convert)=0
 Sets whether or not strokes where the start and end line cap do not match should be converted. The default is false, but ignored if setConvertAllStrokes() has been set to true.
 
virtual void setConvertForMismatchedDashCap (bool convert)=0
 Sets whether or not strokes where the line is dashed and the dash dash cap does not match both of the line capse. The default is false but ignored if setConvertAllStreoks() has been set to true.
 
virtual void setConvertForJoin (IDOMPathNode::eStrokeLineJoin join, bool convert=true)=0
 Sets whether or not strokes containing the given line join type should be converted. In all cases the default is false, but this is ignored if setConvertAllStrokes() has been set to true.
 
virtual void setConvertForNonStrokingSegments (bool convert)=0
 Sets whether or not strokes with any segments marked non-stroking should be converted. The default is false, but this is ignored if setConvertAllStrokes() has been set to true.
 
- Public Member Functions inherited from JawsMako::ITransform
virtual IDOMBrushPtr transform (const IDOMBrushPtr &brush, eBrushUsage usage=eBUGeneral, const CTransformState &state=CTransformState())=0
 Apply the transform to the given brush, if applicable. These transforms are thread safe. More...
 
virtual IDOMImagePtr transform (const IDOMImagePtr &image, const CTransformState &state=CTransformState())=0
 Apply the transform to the given image, if applicable. These transforms are thread safe. More...
 
virtual IDOMColorPtr transform (const IDOMColorPtr &color, const CTransformState &state=CTransformState())=0
 Apply the transform to the given color, if applicable. These transforms are thread safe. More...
 
virtual IDOMColorSpacePtr transform (const IDOMColorSpacePtr &colorSpace, const CTransformState &state=CTransformState())=0
 Apply the transform to the given colorspace, if applicable. These transforms are thread safe. More...
 
virtual IDOMNodePtr transform (const IDOMNodePtr &node, bool &changed, bool transformChildren=true, const CTransformState &state=CTransformState())=0
 Apply the transform to the given node, if applicable. These transforms are thread safe, providing no other transforms are being applied to the same nodes at the same time. More...
 
virtual void transformPage (const IPagePtr &page, bool transformContent=true, bool transformAnnotations=true)=0
 Apply the transform to the given page, if applicable. These transforms are thread safe, providing no other transforms are being applied to the same nodes at the same time. The transform will also apply to the annotations appearances. More...
 
virtual void flushCaches ()=0
 Flush the caches used by the transform. Most transforms cache recently transformed results to improve the performance of repeated transformations of equivalent results. However, it is possible that some cached results may point to entities that no longer exist, such as content inside an XPS file that no longer exists. If you are deleting or replacing files where transforms have been used, it is advisable to invoke this routine to clear the caches.
 
virtual void setProgressMonitor (const IProgressMonitorPtr &progressMonitor)=0
 Set the IProgressMonitor object for this transform to allow for monitoring the progress of the transform. More...
 
- Public Member Functions inherited from IRCObject
virtual void addRef () const =0
 Increases the reference count of the actual object pointed to. This would take place during an assignment or copying.
 
virtual bool decRef () const =0
 Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. More...
 
virtual int32 getRefCount () const =0
 Retrieve the current reference count of the actual object pointed to. More...
 

Static Public Member Functions

static JAWSMAKO_API IStrokerTransformPtr create (const IJawsMakoPtr &jawsMako, const IAbortPtr &abort=IAbortPtr())
 Create the transform. More...
 

Additional Inherited Members

- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

A transform for converting some or all stroked paths into plain filled paths.

Different rendering engines have different stroking abilities. XPS for example supports several stroking capabilities that, say, PDF or SVG support, such as triangular line caps, using a different start and end line caps, and the ability to mark sections of a path as non-stroking.

Further, XPS and most other renderers differ in how miters are treated, with XPS "clipping" miters to the miter limit where PDF and SVG renderers would simply bevel instead.

This filter provides a method for converting strokes to plain fills in all cases or only in certain circumstances.

For best results the transform entry in the state given to the transform() routines should be valid.

Member Function Documentation

◆ create()

static JAWSMAKO_API IStrokerTransformPtr JawsMako::IStrokerTransform::create ( const IJawsMakoPtr &  jawsMako,
const IAbortPtr &  abort = IAbortPtr() 
)
static

Create the transform.

Parameters
jawsMakoThe JawsMako instance.
abortAn abort callback handler.
Returns
The new instance.

◆ setupForPDFStyleOutput()

virtual void JawsMako::IStrokerTransform::setupForPDFStyleOutput ( )
pure virtual

Sets up the stroker transform for output to a PDF style consumner.

    Equivalent to (on a freshly instantiated transform):
       setConvertAllStrokes(false);
       setConvertForMiterTreatment(IDOMPathNode::eClipLongMiters);
       setConvertForLineCap(IDOMPath::eTriangleCap);
       setConvertForDashCap(IDOMPath::eTriangleCap);
       setConvertForMismatchedCaps(true);
       setConvertForMismatchedDashCap(true);
       setConvertForNonStrokingSegments(true);
       setConvertForNonTilingVisualOrImageStrokes(true);

◆ setupForXPSStyleOutput()

virtual void JawsMako::IStrokerTransform::setupForXPSStyleOutput ( )
pure virtual

Sets up the stroker transform for output to an XPS style consumer.

    Equivalent to (on a freshly instantiated transform):
       setConvertAllStrokes(false);
       setConvertForMiterTreatment(IDOMPathNode::eBevelLongMiters);

The documentation for this class was generated from the following file: