InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Facade::IGeometryFacade Class Referenceabstract
Inheritance diagram for Facade::IGeometryFacade:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IGEOMETRYFACADE }
 

Public Member Functions

virtual int32 GetGeometryItemsCount (const UIDList &items) const =0
 
virtual bool16 CanChangeItemsHeight (const UIDList &items, const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 CanChangeItemsWidth (const UIDList &items, const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 CanChangeItemsLength (const UIDList &items, const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 ItemsHaveHeight (const UIDList &items, const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual bool16 ItemsHaveWidth (const UIDList &items, const Transform::CoordinateSpace &boundsSpace) const =0
 
virtual void GetItemsHeight (const UIDList &items, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetItemsWidth (const UIDList &items, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetItemsSize (const UIDList &items, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMPoint > &results) const =0
 
virtual void GetItemsLength (const UIDList &items, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > &results) const =0
 
virtual void GetItemsDimensions (const UIDList &items, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::CoordinateSpace &measurementSpace, K2Vector< PMReal > *widths, K2Vector< PMReal > *heights, bool32 *itemsHaveWidth, bool32 *itemsHaveHeight) const =0
 
virtual ErrorCode ResizeItems (const UIDList &items, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::TransformOrigin &referencePoint, const Geometry::ResizeValue &newSize)=0
 
virtual ErrorCode SetItemsBounds (const UIDList &items, const Transform::CoordinateSpace &coordinateSpace, Geometry::BoundsKind boundsKind, PMRectCollection &newFrames)=0
 
virtual PMRect GetItemBounds (const UIDRef &itemRef, const Transform::CoordinateSpace &coordinateSpace, Geometry::BoundsKind kind) const =0
 
virtual PMRect GetItemsBounds (const UIDList &items, const Transform::CoordinateSpace &coordinateSpace, Geometry::BoundsKind kind) const =0
 
virtual ErrorCode ConstructResizeScriptMethod (IScriptRequestData *scriptRequestData, const Transform::CoordinateSpace &boundsSpace, Geometry::BoundsKind boundsKind, const Transform::TransformOrigin &referencePoint, const Geometry::ResizeValue &newSize)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual bool16 Facade::IGeometryFacade::CanChangeItemsHeight (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace 
) const
pure virtual

Can any of the items change height?

Returns
bool16
virtual bool16 Facade::IGeometryFacade::CanChangeItemsLength (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace 
) const
pure virtual

Can any of the items change length?

Returns
bool16
virtual bool16 Facade::IGeometryFacade::CanChangeItemsWidth (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace 
) const
pure virtual

Can any of the items change width?

Returns
bool16
virtual ErrorCode Facade::IGeometryFacade::ConstructResizeScriptMethod (IScriptRequestDatascriptRequestData,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::TransformOriginreferencePoint,
const Geometry::ResizeValuenewSize 
)
pure virtual

Construct a script event for the given resize parameters.

Parameters
scriptRequestData- a newly created IScriptRequestData
boundsSpace- see ResizeItems
boundsKind- see ResizeItems
referencePoint- see ResizeItems
newSize- see ResizeItems
virtual PMRect Facade::IGeometryFacade::GetItemBounds (const UIDRefitemRef,
const Transform::CoordinateSpacecoordinateSpace,
Geometry::BoundsKind kind 
) const
pure virtual
Parameters
itemRefis the page item to measure
coordinateSpaceis one of Transform::PasteboardCoordinates(), Transform::ParentCoordinates() or Transform::InnerCoordinates()
boundsKindis one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()
virtual PMRect Facade::IGeometryFacade::GetItemsBounds (const UIDListitems,
const Transform::CoordinateSpacecoordinateSpace,
Geometry::BoundsKind kind 
) const
pure virtual
Parameters
itemsis the list of page items to measure
coordinateSpaceis one of Transform::PasteboardCoordinates() or Transform::ParentCoordinates()
boundsKindis one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()
virtual void Facade::IGeometryFacade::GetItemsDimensions (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > * widths,
K2Vector< PMReal > * heights,
bool32 * itemsHaveWidth,
bool32 * itemsHaveHeight 
) const
pure virtual

This routine is used by panels to collect width and height info for a list of page items. It does the same work as GetItemsSize, GetItemsHeight, ItemsHaveWidth and ItemsHaveHeight but more efficiently because it can do it all at the same time.

Parameters
K2Vector<PMReal>&[IN] the source page items
boundsSpace[IN] stroke bounds, path bounds, etc
measurementSpace[IN] inner coordinates, spread coordinates, etc.
widths[OUT] If non-nil, will contain the width values
heights[OUT] If non-nil, will contain the height values
itemsHaveWidth[OUT] If non-nil, will contain whether or not the items have width
itemsHaveHeight[OUT] If non-nil, will contain whether or not the items have height
virtual void Facade::IGeometryFacade::GetItemsHeight (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > & results 
) const
pure virtual

Return the height of the selection.

Parameters
K2Vector<PMReal>&
useStrokeif kTrue GetStrokeDimensions, otherwise, GetPathDimensions
virtual void Facade::IGeometryFacade::GetItemsLength (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > & results 
) const
pure virtual

Get the length of the selected items (note, it is not number of selected items)

Parameters
K2Vector<PMReal>&
useStrokeif kTrue GetStrokeDimensions, otherwise, GetPathDimensions
virtual void Facade::IGeometryFacade::GetItemsSize (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMPoint > & results 
) const
pure virtual

Get the width of the selection.

Parameters
K2Vector<PMReal>&
useStrokeif kTrue GetStrokeDimensions, otherwise, GetPathDimensions
virtual void Facade::IGeometryFacade::GetItemsWidth (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::CoordinateSpacemeasurementSpace,
K2Vector< PMReal > & results 
) const
pure virtual

Get the width of the selection.

Parameters
K2Vector<PMReal>&
useStrokeif kTrue GetStrokeDimensions, otherwise, GetPathDimensions
virtual bool16 Facade::IGeometryFacade::ItemsHaveHeight (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace 
) const
pure virtual

Does the UIDList have a height?

Returns
kTrue if selection has a 'height' attribute, kFalse otherwise
virtual bool16 Facade::IGeometryFacade::ItemsHaveWidth (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace 
) const
pure virtual

Does the UIDList have a height?

Returns
kTrue if selection has a 'width' attribute, kFalse otherwise
virtual ErrorCode Facade::IGeometryFacade::ResizeItems (const UIDListitems,
const Transform::CoordinateSpaceboundsSpace,
Geometry::BoundsKind boundsKind,
const Transform::TransformOriginreferencePoint,
const Geometry::ResizeValuenewSize 
)
pure virtual

ResizeItems changes the size of every item in items according to the given newSize parameter. The change is made in coordinateSpace coordinates relative to referencePoint. The boundsKind parameter specifies whether the target size is for the bounding box of the mathematical path of each item or the potentially larger stroke bounds.

ResizeItems has the same effect as ReframeItems with respect to the page items contents. (See the notes on ReframeItems below.)

Parameters
itemsis the list of page items to resize
coordinateSpaceis one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates()
referencePointis the stationary point of the resize operation
newSizeis one of the following: Geometry::AddTo( Geometry::KeepCurrentValue(), y_delta) Geometry::AddTo( x_delta, Geometry::KeepCurrentValue()) Geometry::AddTo( Geometry::KeepCurrentProportions(), y_delta) Geometry::AddTo( x_delta, Geometry::KeepCurrentProportions()) Geometry::AddTo( x_delta, y_delta)

Geometry::MultiplyBy( Geometry::KeepCurrentValue(), y_factor) Geometry::MultiplyBy( x_factor, Geometry::KeepCurrentValue()) Geometry::MultiplyBy( Geometry::KeepCurrentProportions(), y_factor) Geometry::MultiplyBy( x_factor, Geometry::KeepCurrentProportions()) Geometry::MultiplyBy( x_factor, y_factor)

Geometry::ResizeTo( Geometry::KeepCurrentValue(), y_value) Geometry::ResizeTo( x_value, Geometry::KeepCurrentValue()) Geometry::ResizeTo( Geometry::KeepCurrentProportions(), y_value) Geometry::ResizeTo( x_value, Geometry::KeepCurrentProportions()) Geometry::ResizeTo( x_value, y_value)

Parameters
boundsKindis one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()
virtual ErrorCode Facade::IGeometryFacade::SetItemsBounds (const UIDListitems,
const Transform::CoordinateSpacecoordinateSpace,
Geometry::BoundsKind boundsKind,
PMRectCollectionnewFrames 
)
pure virtual

SetItemsBounds changes the bounding box of each item in items to the corresponding rectangle in newFrames. The parameter coordinateSpace gives the coordinate system for every rectangle in newFrames. The parameter boundsKind specifies whether the rectangles are the target bounding boxes for the item's mathematical paths or the visible strokes.

Note that changing the bounding box of a page item does not, in general, reposition any content within that page item that doesn't automatically reflow on its own (like text or the children of a group do). In particular, an image within a graphic frame will be cropped by the new frame. The pixels themselves will not change in size or move on the page. (If one reframes the image itself, rather than the graphic frame, the pixels are simply scaled so that the image fills the new size and position.)

Parameters
itemsis the list of page items to reframe
coordinateSpaceis one of Transform::PasteboardCoordinates() or Transform::InnerCoordinates()
newFramesis the list of new frames–one corresponding te each item in items.
boundsKindis one of Geometry::OuterStrokeBounds() or Geometry::PathBounds()