Table of Contents

Method Fit

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Fit(DxfViewport, DisplayBox, out GeoPoint2, out double)

The view that shows a box of model space wholly in a viewport's frame, as ZOOM Window or Extents in a viewport: about the box's middle, as high as the box or as its width needs in the frame's proportion; through a twisted view, the box as the view turns it.

public static void Fit(DxfViewport viewport, DisplayBox box, out GeoPoint2 viewCenter, out double viewHeight)

Parameters

viewport DxfViewport

The viewport.

box DisplayBox

The box of model space; not empty.

viewCenter GeoPoint2

The centre of the view as the viewport keeps it (ViewCenter).

viewHeight double

The height of model space the frame shows.

Exceptions

ArgumentNullException

Thrown when the viewport is null.