InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPathEndStroker Class Referenceabstract

#include <IPathEndStroker.h>

Inheritance diagram for IPathEndStroker:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPATHENDSTROKER }
 
enum  PathEndLocation { kPathEndAtNeitherEnd = 0, kPathEndAtEnd = 1, kPathEndAtStart = 2, kPathEndAtBothEnds = 3 }
 

Public Member Functions

virtual void StrokeLineToPathEnd (IGraphicStyleDescriptor *styleDescriptor, int32 endLocation, const PMPoint &startPt, const PMPoint &endPt, IGraphicsPort *gPort) const =0
 
virtual bool16 InLineToPathEnd (IGraphicStyleDescriptor *styleDescriptor, int32 endLocation, const PMPoint &startPt, const PMPoint &endPt, const PMRect &r, IGraphicsPort *gPort) const =0
 
virtual PMRect GetLineToPathEndBBox (IGraphicStyleDescriptor *styleDescriptor, int32 endLocation, const PMPoint &startPt, const PMPoint &endPt, const PMMatrix &matrix) const =0
 
virtual void StrokeCurveToPathEnd (IGraphicStyleDescriptor *styleDescriptor, int32 endLocation, const PMPoint &P0, const PMPoint &P1, const PMPoint &P2, const PMPoint &P3, IGraphicsPort *gPort) const =0
 
virtual bool16 InCurveToPathEnd (IGraphicStyleDescriptor *styleDescriptor, int32 endLocation, const PMPoint &P0, const PMPoint &P1, const PMPoint &P2, const PMPoint &P3, const PMRect &r, IGraphicsPort *gPort) const =0
 
virtual PMRect GetCurveToPathEndBBox (IGraphicStyleDescriptor *styleDescriptor, int32 endLocation, const PMPoint &P0, const PMPoint &P1, const PMPoint &P2, const PMPoint &P3, const PMMatrix &matrix) const =0
 
virtual PMPathPoint StrokePathEndAdjust (const PMPathPoint &pt0, const PMPathPoint &pt1, IGraphicStyleDescriptor *styleDescriptor, int32 endLocation) const =0
 
virtual void GetPathEndName (PMString *pathendName) const =0
 
virtual void StrokeLineToPathEndForUI (int32 endLocation, const PMPoint &startPt, const PMPoint &endPt, IGraphicsPort *gPort, const PMReal &strokeWidth, PMReal arrowHeadScale) const =0
 
virtual void CreateLineEndPath (int32 endLocation, const PMPoint &startPt, const PMPoint &endPt, IGraphicsPort *gPort, const PMReal &strokeWidth, PMReal arrowHeadScale) const =0
 
virtual ScriptID GetScriptID (const ScriptInfo::RequestContext &context) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IPathStroker defines the interface to be implemented by installable path end strokers (i.e., arrowheads)

Member Enumeration Documentation

This enum describes the location of the end cap(s) to draw

Member Function Documentation

virtual void IPathEndStroker::CreateLineEndPath (int32 endLocation,
const PMPointstartPt,
const PMPointendPt,
IGraphicsPortgPort,
const PMRealstrokeWidth,
PMReal arrowHeadScale 
) const
pure virtual

Creates the end path for a line. Typically called at a higher level via StrokeLineToPathEnd, but this function allows path end stroking to be done when no IGraphicStyleDescriptor is available, e.g. in an handle shape adornment.

Parameters
endLocationIN The location for the path ends
startPtIN The starting point for the line
endPtIN The ending point for the line
gPortIN The port to draw into
strokeWidthIN Width of the stroke to use
arrowHeadScaleIN Percentage Scaling of the arrowHead
See Also
IGraphicsPort
virtual PMRect IPathEndStroker::GetCurveToPathEndBBox (IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation,
const PMPointP0,
const PMPointP1,
const PMPointP2,
const PMPointP3,
const PMMatrixmatrix 
) const
pure virtual

Returns the bounding box of the path end for a curve using the supplied matrix If the item has no stroke, compute the bbox using a stroke weight of 0, i.e. return the bounds of the path

Parameters
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
P0IN The curve's first control point
P1IN The curve's second control point
P2IN The curve's third control point
P3IN The curve's fourth control point
matrixIN The matrix to transform the bounding box by
See Also
IGraphicStyleDescriptor
Returns
the bounding box
virtual PMRect IPathEndStroker::GetLineToPathEndBBox (IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation,
const PMPointstartPt,
const PMPointendPt,
const PMMatrixmatrix 
) const
pure virtual

Returns the bounding box of the path end for a line using the supplied matrix If the item has no stroke, compute the bbox using a stroke weight of 0, i.e. return the bounds of the path

Parameters
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
startPtIN The starting point for the path end
endPtIN The ending point for the path end
matrixIN The matrix to transform the bounding box by
Returns
the bounding box
See Also
IGraphicStyleDescriptor
virtual void IPathEndStroker::GetPathEndName (PMStringpathendName) const
pure virtual

Fills in the text string that describes this type of end

Parameters
pathendNameOUT The name of the path end
virtual ScriptID IPathEndStroker::GetScriptID (const ScriptInfo::RequestContextcontext) const
pure virtual

Returns the ScriptID associated with this path end in the given scripting DOM

virtual bool16 IPathEndStroker::InCurveToPathEnd (IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation,
const PMPointP0,
const PMPointP1,
const PMPointP2,
const PMPointP3,
const PMRectr,
IGraphicsPortgPort 
) const
pure virtual

Does the rect intersect the path end for a curve?

Note: Won't be called if the item has no stroke.

Parameters
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
P0IN The curve's first control point
P1IN The curve's second control point
P2IN The curve's third control point
P3IN The curve's fourth control point
rIN The rectangle to test
gPortIN The port to draw into
Returns
kTrue if the rect intersects, else kFalse
See Also
IGraphicStyleDescriptor
IGraphicsPort
virtual bool16 IPathEndStroker::InLineToPathEnd (IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation,
const PMPointstartPt,
const PMPointendPt,
const PMRectr,
IGraphicsPortgPort 
) const
pure virtual

Does the rect intersect the path end for a line?

Note: Won't be called if the item has no stroke.

Parameters
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
startPtIN The starting point for the path end
endPtIN The ending point for the path end
rIN The rectangle to test
gPortIN The port to draw into
Returns
kTrue if the rect intersects, else kFalse
See Also
IGraphicStyleDescriptor
IGraphicsPort
virtual void IPathEndStroker::StrokeCurveToPathEnd (IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation,
const PMPointP0,
const PMPointP1,
const PMPointP2,
const PMPointP3,
IGraphicsPortgPort 
) const
pure virtual

Strokes the end path for a curve. Assume that the correct rendering object was setup during the stroking of the curve except for the no stroke case.

Note: Won't be called if the item has no stroke.

Parameters
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
P0IN The curve's first control point
P1IN The curve's second control point
P2IN The curve's third control point
P3IN The curve's fourth control point
gPortIN The port to draw into
See Also
IGraphicStyleDescriptor
IGraphicsPort
virtual void IPathEndStroker::StrokeLineToPathEnd (IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation,
const PMPointstartPt,
const PMPointendPt,
IGraphicsPortgPort 
) const
pure virtual

Strokes the end path for a line. Assume that the correct rendering object was setup during the stroking of the line except for the no stroke case.

Note: Won't be called if the item has no stroke.

Parameters
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
startPtIN The starting point for the line
endPtIN The ending point for the line
gPortIN The port to draw into
See Also
IGraphicStyleDescriptor
IGraphicsPort
virtual void IPathEndStroker::StrokeLineToPathEndForUI (int32 endLocation,
const PMPointstartPt,
const PMPointendPt,
IGraphicsPortgPort,
const PMRealstrokeWidth,
PMReal arrowHeadScale 
) const
pure virtual

Stroke the end path for UI purposes. Assume that the correct rendering object was setup during the stroking of the line except for the no stroke case. In the no stroke case StrokePathEnd won't be called.

Parameters
endLocationWhich end(s) to stroke
startPtStart point for line
endPtEnd point for line
gPortPort to stroke to
strokeWidthWidth of the stroke to use
arrowHeadScalePercentage Scaling of the arrowHead
See Also
IGraphicsPort
virtual PMPathPoint IPathEndStroker::StrokePathEndAdjust (const PMPathPointpt0,
const PMPathPointpt1,
IGraphicStyleDescriptorstyleDescriptor,
int32 endLocation 
) const
pure virtual

Gets the adjusted path point for stroking a line

Parameters
pt0IN The line's start point
pt1IN The line's end point
styleDescriptorIN The graphic style descriptor to use
endLocationIN The location for the path ends
Returns
desired ending PathPoint
See Also
IGraphicStyleDescriptor