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

#include <IGeometry.h>

Inheritance diagram for IGeometry:
IPMUnknownCGeometry

Public Types

enum  { kDefaultIID = IID_IGEOMETRY }
 

Public Member Functions

virtual PMRect GetStrokeBoundingBox (const PMMatrix &theMatrix) const =0
 
virtual PMRect GetStrokeBoundingBox () const =0
 
virtual ErrorCode SetStrokeBoundingBox (const PMRect &newBBox)=0
 
virtual ErrorCode SetStrokeBoundingBox (const PMMatrix &theMatrix, const PMRect &newBBox)=0
 
virtual PMRect GetPathBoundingBox (const PMMatrix &theMatrix) const =0
 
virtual PMRect GetPathBoundingBox () const =0
 
virtual ErrorCode SetPathBoundingBox (const PMRect &newBBox)=0
 
virtual ErrorCode SetPathBoundingBox (const PMMatrix &theMatrix, const PMRect &newBBox)=0
 
virtual PMReal GetStrokeProportion () const =0
 
virtual PMReal GetPathProportion () const =0
 
PMRect GetBoundingBox (Geometry::BoundsKind kind, const PMMatrix &theMatrix) const
 
PMRect GetBoundingBox (Geometry::BoundsKind kind) const
 
ErrorCode SetBoundingBox (Geometry::BoundsKind kind, const PMRect &newBBox)
 
ErrorCode SetBoundingBox (Geometry::BoundsKind kind, const PMMatrix &theMatrix, const PMRect &newBBox)
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IGeometry is designed to be a "geometry independent" way of defining an object, meaning that nothing in the interface makes any assumption as to the item being rectangular, linear, etc.

PageItems are defined by one or more points. It is up to the implementer to decide how to interpret these point in order to get a BoundingBox, etc. As a convenience there are two sets of methods, one for bounding box with stroke and one for bounding box without stroke. For certain pageitems, such as images, the path bounds and stroke bounds will be the same.

Note: IGeometry does NOT draw. IShape is used for drawing and is implemented in terms of IGeometry.

IGeometry is a required interface of page items.

Member Function Documentation

virtual PMRect IGeometry::GetPathBoundingBox (const PMMatrixtheMatrix) const
pure virtual

Get the bounding box that exclude stroke but with no transformations done.

Parameters
theMatrix[In] parameter used to transform the BBox before returning. For example, if you want a PasteBoardBBox, pass in an InnerToPasteboard Matrix.
Returns
PMRect the result bounding box.

Implemented in CGeometry.

virtual PMRect IGeometry::GetPathBoundingBox () const
pure virtual

Get the bounding box that exclude stroke. Bounding box returned is in inner coordinates.

Returns
PMRect the result bounding box.

Implemented in CGeometry.

virtual PMReal IGeometry::GetPathProportion () const
pure virtual

Get the proportion(width/height) excluding stroke. This is a helper method for constraining.

Returns
PMReal by default this is the width of the bounding box divided by its height.

Implemented in CGeometry.

virtual PMRect IGeometry::GetStrokeBoundingBox (const PMMatrixtheMatrix) const
pure virtual

Get the bounding box that include stroke.

Parameters
theMatrix[In] parameter used to transform the BBox before returning. For example, if you want a PasteBoardBBox, pass in an InnerToPasteboard Matrix.
Returns
PMRect the result bounding box.

Implemented in CGeometry.

virtual PMRect IGeometry::GetStrokeBoundingBox () const
pure virtual

Get the bounding box that include stroke but with no transformations done. Bounding box returned is in inner coordinates.

Returns
PMRect the result bounding box.

Implemented in CGeometry.

virtual PMReal IGeometry::GetStrokeProportion () const
pure virtual

Get the proportion(width/height) including stroke. This is a helper method for constraining.

Returns
PMReal by default this is the width of the bounding box divided by its height.

Implemented in CGeometry.

virtual ErrorCode IGeometry::SetPathBoundingBox (const PMRectnewBBox)
pure virtual

Set the bounding box without stroke in inner coordinates.

Parameters
newBBox[In] parameter used to set the new bounding box.
whichAction[In] parameter used to specify the action for children when doing this operation.
Returns
ErrorCode indicates the result of operation.

Implemented in CGeometry.

virtual ErrorCode IGeometry::SetPathBoundingBox (const PMMatrixtheMatrix,
const PMRectnewBBox 
)
pure virtual

Set the bounding box without stroke.

Parameters
theMatrix[In] parameter that may change the transform of the item depending on the implementation of IGeometry
newBBox[In] parameter used to set the new bounding box.
whichAction[In] parameter used to specify the action for children when doing this operation.
Returns
ErrorCode indicates the result of operation.

Implemented in CGeometry.

virtual ErrorCode IGeometry::SetStrokeBoundingBox (const PMRectnewBBox)
pure virtual

Set the bounding box with stroke in inner coordinates.

Parameters
newBBox[In] parameter used to set the new bounding box.
whichAction[In] parameter used to specify the action for children when doing this operation.
Returns
ErrorCode indicates the result of operation.

Implemented in CGeometry.

virtual ErrorCode IGeometry::SetStrokeBoundingBox (const PMMatrixtheMatrix,
const PMRectnewBBox 
)
pure virtual

Set the bounding box with stroke.

Parameters
theMatrix[In] parameter that may change the transform of the item depending on the implementation of IGeometry
newBBox[In] parameter used to set the new bounding box.
whichAction[In] parameter used to specify the action for children when doing this operation.
Returns
ErrorCode indicates the result of operation.

Implemented in CGeometry.