#include <IPathStroker.h>
|
| enum | { kDefaultIID = IID_IPATHSTROKER } |
| |
|
| virtual ErrorCode | StrokePath (IGraphicStyleDescriptor *pageitem, const IPathGeometry *srcPath, IGraphicsPort *gPort) const =0 |
| |
| virtual bool16 | InStroke (IGraphicStyleDescriptor *pageitem, const IPathGeometry *srcPath, const PMRect &r, IGraphicsPort *gPort) const =0 |
| |
| virtual PMRect | GetStrokePathBBox (IGraphicStyleDescriptor *pageitem, const PMReal &strokeWeight, const PMReal &miterLimit, int32 lineCap, int32 joinType, const IPathGeometry *srcPath, const PMMatrix &theMatrix) const =0 |
| |
| virtual PMRect | GetPaintedStrokePathBBox (IGraphicStyleDescriptor *pageitem, const PMReal &strokeWeight, const PMReal &miterLimit, int32 lineCap, int32 joinType, const IPathGeometry *srcPath, const PMMatrix &theMatrix) const =0 |
| |
| virtual void | GetPathStrokerName (PMString *pathStrokerName) const =0 |
| |
| virtual bool16 | GetOptionsPanelRsrc (PluginID *retPluginID, RsrcID *retRsrcID) const =0 |
| |
| virtual ErrorCode | StrokePathForUI (const IPathGeometry *srcPath, IGraphicsPort *gPort, PMReal const &strokeWidth) const =0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
IPathStroker defines the interface to be implemented by installable path strokers
| virtual bool16 IPathStroker::GetOptionsPanelRsrc | ( | PluginID * | retPluginID, | | | RsrcID * | retRsrcID | | ) | | const |
| pure virtual |
Returns the plugin id and resource id for the panel to load into the stroke panel. If this service does not have a custom panel then return kFalse.
- Parameters
| retPluginID | OUT The PluginID for the options panel resource |
| retRsrcID | OUT The RsrcID for the options panel resource |
- Returns
- kTrue if the stroker has a custom panel resource, else kFalse
Returns the painted bounding box of the stroke transformed by theMatrix
Note: Won't be called if the item has no stroke.
Use the passed in values for stroke weight, line cap, join type, and miter limit because in certain instances they might be different than that in the descriptor. This should be a fast but sloppy computation of the bounds used for invalidation purposes only
- Parameters
| pageitem | IN The pageitem's graphic style descriptor |
| strokeWeight | IN The pageitem's stroke weight |
| miterLimit | IN The pageitem's miter limit |
| lineCap | IN The pageitem's line cap |
| joinType | IN The pageitem's join type |
| srcPath | IN The pageitem's geometry |
| theMatrix | IN The matrix with which to transform the bounding box |
- Returns
- the painted bounding box
- See Also
- IPathStroker::GetStrokePathBBox
- IGraphicStyleDescriptor
- IPathGeometry
| virtual void IPathStroker::GetPathStrokerName | ( | PMString * | pathStrokerName | ) | const |
| pure virtual |
Fills in the text string that describes this type of stroke. Future versions of this interface will build an image representation of the stroke.
- Parameters
| pathStrokerName | OUT The name of the stroker |
Returns the bounding box of the stroke transformed by theMatrix
Note: Won't be called if the item has no stroke.
Use the passed in values for stroke weight, line cap, join type, and miter limit because in certain instances they might be different than that in the descriptor.
- Parameters
| pageitem | IN The pageitem's graphic style descriptor |
| strokeWeight | IN The pageitem's stroke weight |
| miterLimit | IN The pageitem's miter limit |
| lineCap | IN The pageitem's line cap |
| joinType | IN The pageitem's join type |
| srcPath | IN The pageitem's geometry |
| theMatrix | IN The matrix with which to transform the bounding box |
- Returns
- the stroked bounding box
- See Also
- IPathStroker::GetPaintedStrokePathBBox
- IGraphicStyleDescriptor
- IPathGeometry
Returns kTrue if the rect intersects the pageitem's stroke, else kFalse
Note: Won't be called if the item has no stroke. Note: gPort is assumed to aggregate IRasterPort
- Parameters
| pageitem | IN The pageitem's graphic style descriptor |
| srcPath | IN The pageitem's geometry |
| r | IN The rectangle to test against |
| gPort | IN The port to use |
- Returns
- whether the given rectangle intersects the pageitem's stroke
- See Also
- IGraphicStyleDescriptor
- IPathGeometry
- IGraphicsPort
Stroke the pageitem. The word stroke is overloaded to really mean set up the path and renderingobject and then call the appropriate marking function (e.g. stroke) on gPort. For solid lines StrokePath is a simple copy of the path into the port. For other styles, such as dotted or dashed, a more elaborate path setup/stroke is required.
The rendering object is set before calling this method. Also, the path already exists in the port – for solid strokes this means the implementation is very simple. If you want to change the path don't forget to call newpath first. gsave/grestore is called for the path stroker – no need to do it inside strokepath. If there is no stroke then StrokePath won't be called.
- Parameters
| pageitem | IN The pageitem's graphic style descriptor |
| srcPath | IN The pageitem's geometry |
| gPort | IN The graphics port in which to draw the stroke |
- Returns
- an ErrorCode describing the success/failure of the stroke operation
- See Also
- IGraphicStyleDescriptor
- IPathGeometry
- IGraphicsPort
Strokes the given path for use in the user interface. Implementations should use an appropriate default graphics state when drawing.
Note: A default rendering object has already been installed in the port
- Parameters
| srcPath | IN The path geometry for the stroke |
| gPort | IN The port in which to draw |
| strokeWidth | IN The stroke weight for the stroke |
- See Also
- IPathGeometry
- IGraphicsPort