Mako 7.3.0 API
JawsMako::ICustomTransform Class Reference

A transform that allows the implementation to be provided externally. More...

#include <customtransform.h>

Inheritance diagram for JawsMako::ICustomTransform:

Classes

class  IImplementation
 Callback interface that provides methods for actually doing the work. Override the cases for the objects you wish to edit or are otherwise interested in. More...
 

Static Public Member Functions

static JAWSMAKO_API ICustomTransformPtr create (const IJawsMakoPtr &jawsMako, IImplementation *implementation, const IAbortPtr &abort=IAbortPtr(), bool dependsOnClipBounds=true, bool dependsOnGroupSpace=true, bool dependsOnRenderingIntent=true, bool dependsOnTransform=true, bool dependsOnBrushUsage=true, bool dependsOnEdgeMode=true, bool dependsOnUncoloredTilingBrush=true)
 Create an ICustomTransform object whose underlying methods are supported by the implementation object. Note - this creation routine will be removed in a future version of Mako and replaced with a version that is equivalent to calling this function with default arguments. More...
 
static JAWSMAKO_API ICustomTransformPtr create (const IJawsMakoPtr &jawsMako, IImplementation *implementation, const IAbortPtr &abort, bool dependsOnClipBounds, bool dependsOnGroupSpace, bool dependsOnRenderingIntent, bool dependsOnTransformScale, bool dependsOnTransformOffset, bool dependsOnBrushUsage, bool dependsOnEdgeMode, bool dependsOnUncoloredTilingBrush)
 Create an ICustomTransform object whose underlying methods are supported by the implementation object. More...
 

Additional Inherited Members

- 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...
 
- Protected Member Functions inherited from IRCObject
virtual ~IRCObject ()
 Virtual destructor.
 

Detailed Description

A transform that allows the implementation to be provided externally.

This class allows Mako users to create their own transforms. In Mako, transforms are a convenient method of performing operations on items in the DOM tree with a minimum of fuss.

To create a transform, provide your own implementation of the ICustomTransform::IImplementation. Here you can override the default handlers for a given graphical node, color, colorspace, font etc, making the edits you wish to that object, while the custom transform mechanism will update the DOM with your result, taking care of its use in shared objects like forms and patterns automatically. Once you have an IImplementation, use ICustomTransform::create() and use the resulting transform as you would any other. These transforms can also be inserted into ITransformChains.

For most objects, a CTransformState will be provided, providing some context for edits that rely on scaling, the group color space, clip, etc.

This can also be used for scanning purposes. For example, let's say you wanted to find out information for every image in a document. You could write a custom transform to override transformImageBrush(). Your code will be called every time a unique imagebrush (IDOMImageBush) is encountered, and from there get to the image (IDOMImage) and its frame (IDOMFrame) to obtain all the information you need - size, resolution, colorspace etc in conjunction with the CTransformState.


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