Class Underlay
Represents an underlay EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Underlay : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceUnderlay(UnderlayDefinition)
Initializes a new instance of the Underlay class.
Declaration
public Underlay(UnderlayDefinition definition)
Parameters
| Type | Name | Description |
|---|---|---|
| UnderlayDefinition | definition |
Underlay(UnderlayDefinition, Vector3)
Initializes a new instance of the Underlay class.
Declaration
public Underlay(UnderlayDefinition definition, Vector3 position)
Parameters
| Type | Name | Description |
|---|---|---|
| UnderlayDefinition | definition | |
| Vector3 | position | Underlay Vector3 in world coordinates. |
Underlay(UnderlayDefinition, Vector3, Double)
Initializes a new instance of the Underlay class.
Declaration
public Underlay(UnderlayDefinition definition, Vector3 position, double scale)
Parameters
| Type | Name | Description |
|---|---|---|
| UnderlayDefinition | definition | |
| Vector3 | position | Underlay Vector3 in world coordinates. |
| System.Double | scale | Underlay scale. |
Properties
| Improve this Doc View SourceClippingBoundary
Gets or sets the underlay clipping boundary.
Declaration
public ClippingBoundary ClippingBoundary { get; set; }
Property Value
| Type | Description |
|---|---|
| ClippingBoundary |
Remarks
Set as null to restore the default clipping boundary, show the full underlay without clipping.
Contrast
Gets or sets the underlay contrast.
Declaration
public short Contrast { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Remarks
Valid values range from 20 to 100.
Definition
Gets the underlay definition.
Declaration
public UnderlayDefinition Definition { get; }
Property Value
| Type | Description |
|---|---|
| UnderlayDefinition |
DisplayOptions
Gets or sets the underlay display options.
Declaration
public UnderlayDisplayFlags DisplayOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| UnderlayDisplayFlags |
Fade
Gets or sets the underlay fade.
Declaration
public short Fade { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Remarks
Valid values range from 0 to 80.
Position
Gets or sets the underlay position in world coordinates.
Declaration
public Vector3 Position { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Rotation
Gets or sets the underlay rotation around its normal.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Scale
Gets or sets the underlay scale.
Declaration
public Vector2 Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Remarks
Any of the vector scale components cannot be zero.
Even thought the DXF has a code for the Z scale it seems that it has no use.
The X and Y components multiplied by the original size of the PDF page represent the width and height of the final underlay.
The Z component even thought it is present in the DXF it seems it has no use.
Methods
| Improve this Doc View SourceClone()
Creates a new Underlay that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Underlay that is a copy of this instance. |
Overrides
| Improve this Doc View SourceTransformBy(Matrix3, Vector3)
Moves, scales, and/or rotates the current entity given a 3x3 transformation matrix and a translation vector.
Declaration
public override void TransformBy(Matrix3 transformation, Vector3 translation)
Parameters
| Type | Name | Description |
|---|---|---|
| Matrix3 | transformation | Transformation matrix. |
| Vector3 | translation | Translation vector. |
Overrides
Remarks
Non-uniform scaling for rotated underlays is not supported.
This is not a limitation of the code but the DXF format, unlike the Image there is no way to define the local UV vectors.
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.