v2.49
IRectBoundedObject Interface Reference

Represents a rect bounded object with content. More...

Public Member Functions

HRESULT FitBoundsToContent ([in] double inset)
 Fits the bounding rect of the object to its content with specified inset.
HRESULT GetContentPlacement ([out, retval] IPlacement2D **ppContentPlacement)
 Returns the copy of object's content placement in the Global Coordinate System if object has content, null otherwise.
HRESULT SetContentPlacement ([in] IPlacement2D *pPlacement)
 Sets the object's content placement in the Global Coordinate System.

Properties

Rect BoundRect [get, set]
 The bounding rect of the object in the Global Coordinate System.
VARIANT_BOOL HasContent [get]
 Returns true if object has content, false otherwise.

Detailed Description

Represents a rect bounded object with content.

Use this interface to control the bounding rect and content placement for objects such as EmbeddedEntityView, EmbeddedModelView, EmbeddedSchedule, EmbeddedTable and EmbeddedLegend. This interface can be obtained as an additional interface from IModelObject.

See image below for details:

See also
IModelObject, Rect

Member Function Documentation

◆ FitBoundsToContent()

HRESULT FitBoundsToContent ( [in] double inset)

Fits the bounding rect of the object to its content with specified inset.

After calling this method, BoundRect will be resized to exactly enclose the content, with the specified inset applied to each side.

Parameters
[in]insetThe inset applied to the bounding rectangle around content.
See also
BoundRect

◆ GetContentPlacement()

HRESULT GetContentPlacement ( [out, retval] IPlacement2D ** ppContentPlacement)

Returns the copy of object's content placement in the Global Coordinate System if object has content, null otherwise.

The origin of content placement is always located in the center of content bounding box projected on 2D plane.

Parameters
[out]ppContentPlacementThe requested placement of the content.
See also
SetContentPlacement, HasContent, IPlacement2D

◆ SetContentPlacement()

HRESULT SetContentPlacement ( [in] IPlacement2D * pPlacement)

Sets the object's content placement in the Global Coordinate System.

Parameters
[in]pPlacementThe new placement of the content.
See also
GetContentPlacement, HasContent, IPlacement2D

Property Documentation

◆ BoundRect

Rect BoundRect
getset

The bounding rect of the object in the Global Coordinate System.

See also
FitBoundsToContent