Table of Contents

Class DisplayViewport2

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

A viewport of a layout: a window onto model space at a scale, which the canvas draws by clipping to its frame and drawing the model-space items under the viewport's transformation.

public sealed class DisplayViewport2 : DisplayItem2
Inheritance
DisplayViewport2
Inherited Members

Constructors

DisplayViewport2(double, double, double, double, double, double, double, double, DisplayList2, ISet<string>, DisplayStyle, string, string)

Makes a viewport.

Properties

Bounds

Gets the box that holds the item.

CenterX

Gets the X of the centre of the frame, in paper units.

CenterY

Gets the Y of the centre of the frame, in paper units.

Clip

Gets the outline the viewport is clipped to (VPCLIP), in paper units: model space shows through it in place of the frame, and it is the border of the viewport; null for a viewport that is its frame.

FrozenLayers

Gets the layers frozen in this viewport.

Height

Gets the height of the frame in paper units.

Model

Gets the model-space items the viewport shows.

ModelToPaper

Gets the transformation from model space to the paper, as the viewport shows it.

Scale

Gets the paper length of one unit of model space.

Twist

Gets the angle the view is turned by, in radians.

ViewCenterX

Gets the X of the point of model space at the centre of the frame.

ViewCenterY

Gets the Y of the point of model space at the centre of the frame.

Width

Gets the width of the frame in paper units.

Methods

DistanceTo(double, double)

Gets the distance from a point to the item, the shortest to any part that is drawn; the distance to the nearest edge for a fill, nought inside it.