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

#include <ISplineUtils.h>

Inheritance diagram for ISplineUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ISPLINEUTILS }
 

Public Member Functions

virtual void FilterMakeCompoundPathList (UIDList &selectedItems)=0
 
virtual void FilterReleaseCompoundPathList (UIDList &selectedItems)=0
 
virtual void StripTOPSpline (const UIDList &itemList, UIDList *pNewItemList, bool16 bReplaceByMainIfNeeded=kFalse)=0
 
virtual ICommandCreateCopySubPathPipelineCmd (const UIDRef &pathItem, int32 pathIndex)=0
 
virtual PMRect ComputeInnerContentBBox (const IGraphicFrameData *gfd)=0
 
virtual void GetInnerContentBoundsData (const IGraphicFrameData *gfd, PMRect *pTextInset, PMReal *pStrokeWeight, int32 *pStrokeAlignment, PMReal *pEffectiveStrokeWeight=nil)=0
 
virtual void ComputeMinimumInnerDimensionsFor (PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, PMReal strokeWeight, int32 strokeAlignment, PMReal *pSplineLeftWidth, PMReal *pSplineTopHeight, PMReal *pSplineRightWidth, PMReal *pSplineBottomHeight)=0
 
virtual bool16 ComputeInnerContentBounds (const PMRect &splinePathBBox, PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, PMReal strokeWeight, int32 strokeAlignment, PMReal *pInnerPathLeft, PMReal *pInnerPathTop, PMReal *pInnerPathRight, PMReal *pInnerPathBottom)=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

Utilities related to the model for splines.

Member Function Documentation

virtual PMRect ISplineUtils::ComputeInnerContentBBox (const IGraphicFrameDatagfd)
pure virtual

This method will compute the inset bounding box of the specified Spline. The inset bounding box is defined as the inner bounds of the stroke further inset by the TextInset.

Note that the returned inner bounds will always be at least 1 high and 1 wide. This property allows us the MCF to not have to deal with cases where the stroke or inset give it no space. So in effect the MCF will not ever be smaller than 1x1.

Parameters
gfdPointer to IGraphicFrameData interface on a spline boss.
virtual bool16 ISplineUtils::ComputeInnerContentBounds (const PMRectsplinePathBBox,
PMReal leftTextInset,
PMReal topTextInset,
PMReal rightTextInset,
PMReal bottomTextInset,
PMReal strokeWeight,
int32 strokeAlignment,
PMRealpInnerPathLeft,
PMRealpInnerPathTop,
PMRealpInnerPathRight,
PMRealpInnerPathBottom 
)
pure virtual

This method will compute the inset bounding box relative to the specified spline path bbox. Note that the returned inner bounds will always be at least 1 high and 1 wide even if the calculated inner bounds are overlapping or less than one. This property allows us the MCF to not have to deal with cases where the stroke or inset give it no space. So in effect the MCF will not ever be smaller than 1x1. When this adaptation occurs this method returns kFalse.

Parameters
splinePathBBox
leftTextInset
topTextInset
rightTextInset
bottomTextInset
strokeWeight
strokeAlignment
pInnerPathLeft
pInnerPathTop
pInnerRight
pInnerPathBottom
Returns
kTrue if the inner content bounds meet the minimm desired by the MultiColumnTextFrame, kFalse otherwise. Callers seeing kFalse may wish to call
virtual void ISplineUtils::ComputeMinimumInnerDimensionsFor (PMReal leftTextInset,
PMReal topTextInset,
PMReal rightTextInset,
PMReal bottomTextInset,
PMReal strokeWeight,
int32 strokeAlignment,
PMRealpSplineLeftWidth,
PMRealpSplineTopHeight,
PMRealpSplineRightWidth,
PMRealpSplineBottomHeight 
)
pure virtual

This method will compute the minimum inner dimension for the specified spline data to be effective.

Parameters
leftTextInset
topTextInset
rightTextInset
bottomTextInset
strokeWeight
strokeAlignment
pSplineLeftWidth
pSplineTopHeight
pSplineRightWidth
pSplineBottomHeight
virtual ICommand* ISplineUtils::CreateCopySubPathPipelineCmd (const UIDRefpathItem,
int32 pathIndex 
)
pure virtual

Returns a pipeline command that copies the path object and deletes all but one of its paths (it keeps the pathIndex path)

Parameters
pathItemthe path page item to creat a command for
pathIndexthe path index of this item to operate on
Returns
ICommand* the returned command. Caller must release.
virtual void ISplineUtils::FilterMakeCompoundPathList (UIDListselectedItems)
pure virtual

Filter out items that are no elibigle for making compound paths. Locked items are also filtered out.

Parameters
selectedItemsthe UIDList to operate on.
See Also
IsMakeCompoundPathAllowed in IGraphicFrameData
virtual void ISplineUtils::FilterReleaseCompoundPathList (UIDListselectedItems)
pure virtual

Filter out items that are no elibigle for releasing compound paths. Locked items are also filtered out.

Parameters
selectedItemsthe UIDList to operate on.
See Also
IsReleaseCompoundPathAllowed in IGraphicFrameData
virtual void ISplineUtils::GetInnerContentBoundsData (const IGraphicFrameDatagfd,
PMRectpTextInset,
PMRealpStrokeWeight,
int32 * pStrokeAlignment,
PMRealpEffectiveStrokeWeight = nil 
)
pure virtual

Return the parameters/properties of use in computing the inner content bounds of the Spline.

Parameters
gfdPointer to IGraphicFrameData interface on a spline boss.
pTextInsetOUT Pointer to PMRect which will be filled in with text inset
pStrokeWeightOUT Pointer to PMReal which will be filled in with stroke weight
pStrokeAlignmentOUT Pointer to int32 which will be filled in with stroke alignment if stroke weight is non-zero, otherwise kStrokeAlignCenter.
pEffectiveInnerStrokeWeightOUT Optional Pointer to PMReal which will be filled in with effective inner stroke weight
virtual void ISplineUtils::StripTOPSpline (const UIDListitemList,
UIDListpNewItemList,
bool16 bReplaceByMainIfNeeded = kFalse 
)
pure virtual

Given an item list, make a new item list replacing TOP splines with their main item as requested.

Parameters
&itemList,originalitem list to operate on
*pNewItemList[OUT] output list, could be empty
bReplaceByMainIfNeededif kTrue, replace TOP splines with their main item. If kFalse, all items are put into pNewItemList
See Also
GetMainSplineItemUID in ITOPSplineData