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
viewportDxfViewportThe viewport.
boxDisplayBoxThe box of model space; not empty.
viewCenterGeoPoint2The centre of the view as the viewport keeps it (ViewCenter).
viewHeightdoubleThe height of model space the frame shows.
Exceptions
- ArgumentNullException
Thrown when the viewport is null.