![]() | InDesign SDK 20.5 |
#include <ITransform.h>

Public Types | |
| enum | { kDefaultIID = IID_ITRANSFORM } |
| enum | MatrixType { kDynamicMatrix, kStaticMatrix } |
Public Member Functions | |
| virtual PMReal | GetItemScaleX () const =0 |
| virtual PMReal | GetItemScaleY () const =0 |
| virtual PMReal | GetItemSkewAngle () const =0 |
| virtual PMReal | GetItemRotationAngle () const =0 |
| virtual void | ScaleItemBy (PMReal xScale, PMReal yScale, const PMPoint ¢er)=0 |
| virtual void | ScaleItemTo (PMReal xScale, PMReal yScale, const PMPoint ¢er)=0 |
| virtual void | SkewItemTo (PMReal xSkewAngle, const PMPoint ¢er)=0 |
| virtual void | SkewItemBy (PMReal xSkewAngle, const PMPoint ¢er)=0 |
| virtual void | RotateItemBy (PMReal angle, const PMPoint ¢er)=0 |
| virtual void | RotateItemTo (PMReal angle, const PMPoint ¢er)=0 |
| virtual void | TranslateItemBy (const PMPoint &delta)=0 |
| virtual void | TranslateItemTo (const PMPoint &location)=0 |
| virtual void | SetInnerToParentMatrix (const PMMatrix &matrix)=0 |
| virtual const PMMatrix & | GetInnerToParentMatrix () const =0 |
| virtual const PMMatrix & | GetParentToInnerMatrix () const =0 |
| virtual ITransform::MatrixType | GetInnerToRootMatrix (PMMatrix *pMatrix, const ITransform *pRoot=nil) const =0 |
| virtual bool16 | IsTransformParentDependent () const =0 |
| virtual IPMUnknown * | QueryTransformParent ()=0 |
| virtual void | ConcatItemTransform (IGraphicsPort *gPort)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
A persistant interface containing transformation data(3x3 tranform) for a page item.
Get the inner to root matrix by walking up the hierarchy. Some items such as inline have specific implementations of this interface to compute the matrix differently. Some implementations of ITransform may want to cache the result of GetInnerToRootMatrix But other implementations of ITransform may be generated dynamically thereby rendering all child caches invalid. On items that have dynamic transforms, GetInnerToRootMatrix will return kDynamicMatrix and that return value should be passed down the hierarchy. kStaticMatrix means the matrix is set via the normal SetMatrix call which will result in a parentchanged call. It is OK to cache the matrix when GetInnerToRootMatrix returns kStaticMatrix. But you should never cache the matrix when GetInnerToRootMatrix returns kDynamicMatrix.
| pMatrix | [IN] parameter which is to perform the post concatenate. |
| pRoot | [IN] parameter the root item's transform information. |
| pure virtual |
Concatenate this item's transformation, if necessary, into the gPort. Typically this is a simple gPort->concat(CurrentMatrix()), but for some it involves an additional transform as well, and for others (like standoffs), the transform needs to be ignored. Used by TransformUtils::TransformFromRoot().
| gPort | [IN] parameter the graphics port that does the concatenate. |
Implemented in CTransform.
| pure virtual |
Get this item's current inner-to-parent matrix. Note even though the matrix is returned by reference, you must use the result immediately or copy the result to another PMMatrix.
Implemented in CTransform.
| pure virtual |
Get item's rotate angle.
Implemented in CTransform.
| pure virtual |
Get item's x direction scale percentage.
Implemented in CTransform.
| pure virtual |
Get item's y direction scale percentage.
Implemented in CTransform.
| pure virtual |
Get item's x direction skew angle.
Implemented in CTransform.
| pure virtual |
Get this item's current parent-to_inner matrix. Note even though the matrix is returned by reference, you must use the result immediately or copy the result to another PMMatrix.
Implemented in CTransform.
| pure virtual |
Check whether the item can be transformed independent of its parent or not.
Implemented in CTransform.
| pure virtual |
Return an interface pointer to the "transformational parent" of this item. That is, the item whose transformation is concatenated to the current state before ours. For a typical pageitem, this would use IHierarchy::QueryParent() and return that item, but for some (like inlines and standoffs), it's not so simple. Used by TransformUtils::TransformFromRoot().
Implemented in CTransform.
Rotate item with certain angle based on the given reference point.
| angle | [IN] parameter the angle the item rotate by. |
| center | [IN] parameter the reference point in parent coordinate. |
Implemented in CTransform.
Rotate item to certain angle based on the given reference point.
| angle | [IN] parameter the absolute angle the item rotate to. |
| center | [IN] parameter the reference point in parent coordinate. |
Implemented in CTransform.
| pure virtual |
Scale item with certain x/y values based on the given reference point.
| xScale | [IN] parameter the x value the item scale by. |
| yScale | [IN] parameter the y value the item scale by. |
| center | [IN] parameter the reference point in parent coordinate. |
Implemented in CTransform.
| pure virtual |
Scale item to certain x/y values based on the given reference point.
| xScale | [IN] parameter the absolute x value the item scale by. |
| yScale | [IN] parameter the absolute y value the item scale by. |
| center | [IN] parameter the reference point in parent coordinate. |
Implemented in CTransform.
| pure virtual |
Re-orient the item relative to its parent with a new transformation matrix.
| matrix | [IN] parameter the given matrix to be set. |
Implemented in CTransform.
Skew item with certain angle based on the given reference point. We only directly support xSkew but not ySkew. To perform a skew in the y direction, skew in the x direction by the angle desired, and then rotate by the same angle.
| xSkewAngle | [IN] parameter the angle the item skew by. |
| center | [IN] parameter the reference point in parent coordinate. |
Implemented in CTransform.
Skew item to certain angle based on the given reference point. We only directly support xSkew but not ySkew. To perform a skew in the y direction, skew in the x direction by the angle desired, and then rotate by the same angle.
| xSkewAngle | [IN] parameter the absolute angle the item skew by. |
| center | [IN] parameter the reference point in parent coordinate. |
Implemented in CTransform.
| pure virtual |
Move item with delta amount of distance.
| delta | [IN] parameter the amount of distance in parent coordinate. |
Implemented in CTransform.
| pure virtual |
Move item to the specified location.
| location | [IN] parameter the place in parent coordinate where the item will move to. |
Implemented in CTransform.