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

#include <IConvertShapeSuite.h>

Inheritance diagram for IConvertShapeSuite:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICONVERTSHAPESUITE }
 
enum  ShapeType {
  kRectangle, kTriangle, kPolygonX, kOval,
  kEllipse = kOval, kClosedPath, kOpenPath, kLine,
  kOrthogonalLine
}
 
enum  PointType { kLineEnd, kCorner, kSmooth, kSymmetrical }
 
typedef K2Vector< PointTypePointTypeList
 

Public Member Functions

virtual bool16 CanConvertShape (void) const =0
 
virtual bool16 CanConvertPointType () const =0
 
virtual void GetPointType (PointTypeList &pointTypeList, bool16 sortedAndUnique) const =0
 
virtual bool16 CanJoinPoints (void) const =0
 
virtual bool16 CanConnectPoints (void) const =0
 
virtual ErrorCode ConvertPageItemShape (ShapeType convertTo, const ClassID cornerEffect=kInvalidClass, const PMReal &cornerRadius=12.0, const int32 numSides=6, const int32 starInset=0)=0
 
virtual ErrorCode ConvertPointType (PointType convertTo)=0
 
virtual ErrorCode JoinPoints (void)=0
 
virtual ErrorCode ConnectPoints (void)=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

Convert page item shape suite interface

Member Enumeration Documentation

Enumerator
kLineEnd 

Enum describing the types of a path point.

kCorner 

Bezier control handles are in degenerate case–the tangents have collapsed into a point.

kSmooth 

Point with discontinous tangents. For the user, the tangents may be manipulated independently.

kSymmetrical 

Point with two Bezier control handles in a continuous tangent, though length of tangents may vary. Sepcial case of kSmooth in which the two tanguents are continuous and of equal length.

Enumerator
kRectangle 

Rectangle; other type of rectangle such as kRoundedCornerRectangle , kInverseRoundedCornerRectangle, kInsetCornerCornerRectangle, kBevelCornerRectangle, kFancyCornerRectangle, could be acheived by combinition with CornerEffects. Triangle and polygon may also have corner effects.

Member Function Documentation

virtual bool16 IConvertShapeSuite::CanConnectPoints (void ) const
pure virtual

Can connect selected points? Path(s) must be open.

Parameters
none
Returns
bool16 Returns kTrue when one (or two) page item(s) with open path(s) is selected. Need not be in path selection mode.
virtual bool16 IConvertShapeSuite::CanConvertPointType () const
pure virtual

Can convert selected points to another type?

Returns
bool16 kTrue if selected points can be converted, kFalse otherwise
virtual bool16 IConvertShapeSuite::CanConvertShape (void ) const
pure virtual

Can convert any selected page items' shape?

Parameters
none
Returns
bool16
virtual bool16 IConvertShapeSuite::CanJoinPoints (void ) const
pure virtual

Can join selected points? Path(s) must be open. Differs from Connect in that path points must be very close (kMinimalDistance).

Parameters
none
Returns
bool16 Returns kTrue when one (or two) page item(s) with open path(s) is selected. Need not be in path selection mode.
virtual ErrorCode IConvertShapeSuite::ConnectPoints (void )
pure virtual

Connect two selected end points with a segment.

Returns
ErrorCode
virtual ErrorCode IConvertShapeSuite::ConvertPageItemShape (ShapeType convertTo,
const ClassID cornerEffect = kInvalidClass,
const PMRealcornerRadius = 12.0,
const int32 numSides = 6,
const int32 starInset = 0 
)
pure virtual

Convert selected page item shape

Parameters
convertToShapeType the selected pageitem want convert to
cornerEffectClassID of stroke corner effects for the converted page item
cornerRadiusPMReal radius value in points for stroke corner effects for the converted page item
numSidesnumber of sides of polygon for the selected pageitem to convert to, No effect if ShapeType is not kPolygonX
starInsetamount of star inset for the selected pageitem to convert to, No effect if ShapeType is not kPolygonX
Returns
ErrorCode
virtual ErrorCode IConvertShapeSuite::ConvertPointType (PointType convertTo)
pure virtual

Convert selected point type

Parameters
convertTonew PointType the selected point want convert to
Returns
ErrorCode
virtual void IConvertShapeSuite::GetPointType (PointTypeListpointTypeList,
bool16 sortedAndUnique 
) const
pure virtual

GetPointType is used to determine the PointType for the current selection. pointTypeList will be empty if not in path selection mode or if no points are in the path selection.

Parameters
pointTypeListOUT The list for adding point type values to.
sortedAndUniqueIN If kTrue the list will be sorted and duplicates will be removed.
See Also
IPathSelection.h
virtual ErrorCode IConvertShapeSuite::JoinPoints (void )
pure virtual

Join selected two end points (and replace with a single point)

Returns
ErrorCode