NShape Reference
Shape.Fit Method

<< Click to Display Table of Contents >>

Navigation:  Class Reference > Namespace Dataweb.NShape > Shape Class >

NShape Reference
Shape.Fit Method

Previous pageReturn to chapter overviewNext page

Resizes and moves the shape to fit into the given rectangle.

Syntax

public abstract void Fit(int x, int y, int width, int height)

Description

Used to draw thumbnails and when interactively placing shapes on the diagram.

Note to implementers: The method must make sure that the shape completely fits into the given rectangle. It may be little smaller if necessary but at no means bigger.

Parameters

Name

Description

x

X coordinate of the target rectangle

y

Y coordinate of the target rectangle

width

Width of the target rectangle

height

Height of the target rectangle

Exceptions

Name

Description

ArgumentException

Target rectangle is invalid.