Class VPort
Represents a document viewport.
Implements
Inherited Members
Namespace: netDxf.Tables
Assembly: CADability.dll
Syntax
public class VPort : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>
Constructors
| Improve this Doc View SourceVPort(String)
Initializes a new instance of the VPort class.
Declaration
public VPort(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name |
Fields
| Improve this Doc View SourceDefaultName
Default VPort name.
Declaration
public const string DefaultName = "*Active"
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
| Improve this Doc View SourceActive
Gets the active viewport.
Declaration
public static VPort Active { get; }
Property Value
| Type | Description |
|---|---|
| VPort |
GridSpacing
Gets or sets the grid spacing X and Y.
Declaration
public Vector2 GridSpacing { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Owner
Gets the owner of the actual viewport.
Declaration
public VPorts Owner { get; }
Property Value
| Type | Description |
|---|---|
| VPorts |
ShowGrid
Gets or sets the grid on/off.
Declaration
public bool ShowGrid { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SnapBasePoint
Gets or sets the snap base point in DCS (Display Coordinate System)
Declaration
public Vector2 SnapBasePoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
SnapMode
Gets or sets the snap mode on/off.
Declaration
public bool SnapMode { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SnapSpacing
Gets or sets the snap spacing X and Y.
Declaration
public Vector2 SnapSpacing { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
ViewAspectRatio
Gets or sets the view aspect ratio (view width/view height).
Declaration
public double ViewAspectRatio { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
ViewCenter
Gets or sets the view center point in DCS (Display Coordinate System)
Declaration
public Vector2 ViewCenter { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
ViewDirection
Gets or sets the view direction from target point in WCS (World Coordinate System).
Declaration
public Vector3 ViewDirection { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
ViewHeight
Gets or sets the view height.
Declaration
public double ViewHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
ViewTarget
Gets or sets the view target point in WCS (World Coordinate System).
Declaration
public Vector3 ViewTarget { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Methods
| Improve this Doc View SourceClone()
Creates a new VPort that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new VPort that is a copy of this instance. |
Overrides
| Improve this Doc View SourceClone(String)
Creates a new VPort that is a copy of the current instance.
Declaration
public override TableObject Clone(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newName | VPort name of the copy. |
Returns
| Type | Description |
|---|---|
| TableObject | A new VPort that is a copy of this instance. |