Table of Contents

Method ResizeShape

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

ResizeShape(WordDocument, ShapeRef, Emu, Emu)

Resizes a shape, as dragging its handles or the Size boxes of Shape Format do.

public static DocumentEdit ResizeShape(this WordDocument document, ShapeRef shape, Emu width, Emu height)

Parameters

document WordDocument

The document that holds the shape.

shape ShapeRef

The shape.

width Emu

The width.

height Emu

The height.

Returns

DocumentEdit

The edit; the size the shape already has gives an empty edit.

Exceptions

ArgumentNullException

document or shape is null.

ArgumentException

The shape is not in document or not in a paragraph.

ArgumentOutOfRangeException

A side is not above zero or above MaxImageSide.

InvalidOperationException

The shape is not one DrawingML shape or one group of them (a group's children scale with it, Phase 179), or it is in a shape's text box.