Method ViewOf
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
ViewOf(CadView, CadView, DxfViewport, out GeoPoint2, out double)
The view a viewport takes from a view of the canvas in model units, the paper's staying as it is: the scale the two zooms give and the model point at the middle of the frame. The way back from ModelView(CadView, DxfViewport), so a model view zoomed about the cursor gives the viewport's view zoomed there.
public static void ViewOf(CadView paper, CadView model, DxfViewport viewport, out GeoPoint2 viewCenter, out double viewHeight)
Parameters
paperCadViewThe view of the layout.
modelCadViewThe view of the canvas in model units.
viewportDxfViewportThe viewport.
viewCenterGeoPoint2The centre of the view as the viewport keeps it (ViewCenter): the point of model space at the middle of the frame, about the view's target and turned by its twist.
viewHeightdoubleThe height of model space the frame shows.
Exceptions
- ArgumentNullException
Thrown when a view or the viewport is null.