GetVisualBounds

Shape.GetVisualBounds method

Gets the visual bounds of the shape calculated from its rendered content.

public RectangleF GetVisualBounds()

Return Value

A RectangleF that represents the visual bounds of the shape in slide coordinates.

Remarks

The returned rectangle represents the axis-aligned bounds of all content produced by the shape during rendering in slide coordinate space. These bounds may differ from the shape’s model bounds (X, Y, Width, Height) and may contain negative coordinates if the rendered content extends beyond the slide origin. The visual bounds take into account rendering-related aspects such as transformations (for example, rotation), stroke width and joins, text layout and overflow, SmartArt geometry, and other layout effects that influence the final rendered appearance of the shape. The returned bounds are not clipped to the slide rectangle.

See Also