InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StrokeBoundsOutlineInfo Class Reference

#include <StrokeBoundsOutlineInfo.h>

Inheritance diagram for StrokeBoundsOutlineInfo:
IOutlineInfo

Public Member Functions

 StrokeBoundsOutlineInfo (const PMReal &strokeWeight, const PMReal &miterLimit, int32 joinType, int32 lineCap, const PMMatrix &xForm, IGraphicStyleDescriptor *styleDescriptor)
 
PMRect GetBoundingBox ()
 
virtual void BeginPath ()
 
virtual void EndPath ()
 
virtual void moveto (const PMReal &x, const PMReal &y)
 
virtual void lineto (const PMReal &x, const PMReal &y)
 
virtual void curveto (const PMReal &x1, const PMReal &y1, const PMReal &x2, const PMReal &y2, const PMReal &x3, const PMReal &y3)
 
virtual void closepath ()
 

Detailed Description

Concrete implementation of IOutlineInfo. Intended to be used as a glue class for calculating a path's bounding box using information from IPathGeometry and other interfaces that use IOutlineInfo.

Similar to PathBoundsOutlineInfo, but takes into account stroke parameters when calculating bounds, so that returned bounds reflect the bounds that would be marked if the path were stroked.

See Also
IOutlineInfo
PathBoundsOutlineInfo

Constructor & Destructor Documentation

StrokeBoundsOutlineInfo::StrokeBoundsOutlineInfo (const PMRealstrokeWeight,
const PMRealmiterLimit,
int32 joinType,
int32 lineCap,
const PMMatrixxForm,
IGraphicStyleDescriptorstyleDescriptor 
)

Constructs a StrokeBoundsOutlineInfo with the specified stroke parameters and a matrix that will used to define the coordinate system for the input points and the scaling applied to the stroke weight.

Parameters
strokeWeightIN The stroke's weight
miterLimitIN The stroke's miter limit
joinTypeIN The stroke's join type
lineCapIN The stroke's line cap
xFormIN The matrix defining the coordinate system for the input points
styleDescriptorIN Style descriptor defining additional relevant stroke parameters (not currently used). Not AddRef'd

Member Function Documentation

virtual void StrokeBoundsOutlineInfo::BeginPath ()
virtual

Begins a new path. Called before any of the other methods is called.

Implements IOutlineInfo.

virtual void StrokeBoundsOutlineInfo::closepath ()
virtual

Closes the current subpath. If the first point in the subpath (defined by a prior call to moveto) does not correspond to the current point, this call will implicitly add a line segment from the current point to the first point in the subpath.

The current point is undefined after a call to closepath. The caller must call moveto to start a new subpath and establish the current point before calling either lineto, curveto, or closepath.

Implements IOutlineInfo.

virtual void StrokeBoundsOutlineInfo::curveto (const PMRealx1,
const PMRealy1,
const PMRealx2,
const PMRealy2,
const PMRealx3,
const PMRealy3 
)
virtual

Adds a new bezier curve segment to the current subpath, using four control points. The current point in user space at the time the call is made is used as the starting point for the curve. (x1, y1) and (x2, y2) are used as control points defining the degree of curvature and magnitude of the curve, and (x3, y3) defines the end point. The current point is implicitly set to (x3, y3).

Parameters
x1IN The x-component for the first control point of the new bezier segment
y1IN The y-component for the first control point of the new bezier segment
x2IN The x-component for the second control point of the new bezier segment
y2IN The y-component for the second control point of the new bezier segment
x3IN The x-component for the end point of the new bezier segment
y3IN The y-component for the end point of the new bezier segment

Implements IOutlineInfo.

virtual void StrokeBoundsOutlineInfo::EndPath ()
virtual

Ends a path begun by BeginPath.

Implements IOutlineInfo.

PMRect StrokeBoundsOutlineInfo::GetBoundingBox ()

Returns the computed bounds

Returns
the computed bounds
virtual void StrokeBoundsOutlineInfo::lineto (const PMRealx,
const PMRealy 
)
virtual

Adds a line segment to the current subpath. The beginning of the segment is the current point in user space at the time the call is made. The end is (x, y). Implicitly sets the current point to (x, y).

Parameters
xIN The x-component for the end point of the new line segment
yIN The y-component for the end point of the new line segment

Implements IOutlineInfo.

virtual void StrokeBoundsOutlineInfo::moveto (const PMRealx,
const PMRealy 
)
virtual

Starts a new subpath. The current point in user space is set to (x, y).

Parameters
xIN The x-component of the new current point
yIN The y-component of the new current point

Implements IOutlineInfo.