Class Image
Represents a raster image EntityObject.
Inherited Members
Namespace: netDxf.Entities
Assembly: CADability.dll
Syntax
public class Image : EntityObject, IHasXData, ICloneable
Constructors
| Improve this Doc View SourceImage(ImageDefinition, Vector2, Vector2)
Initializes a new instance of the Image class.
Declaration
public Image(ImageDefinition imageDefinition, Vector2 position, Vector2 size)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageDefinition | imageDefinition | Image definition. |
| Vector2 | position | Image Vector2 in world coordinates. |
| Vector2 | size | Image Vector2 in world coordinates. |
Image(ImageDefinition, Vector2, Double, Double)
Initializes a new instance of the Image class.
Declaration
public Image(ImageDefinition imageDefinition, Vector2 position, double width, double height)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageDefinition | imageDefinition | Image definition. |
| Vector2 | position | Image Vector2 in world coordinates. |
| System.Double | width | Image width in world coordinates. |
| System.Double | height | Image height in world coordinates. |
Image(ImageDefinition, Vector3, Vector2)
Initializes a new instance of the Image class.
Declaration
public Image(ImageDefinition imageDefinition, Vector3 position, Vector2 size)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageDefinition | imageDefinition | Image definition. |
| Vector3 | position | Image Vector3 in world coordinates. |
| Vector2 | size | Image Vector2 in world coordinates. |
Image(ImageDefinition, Vector3, Double, Double)
Initializes a new instance of the Image class.
Declaration
public Image(ImageDefinition imageDefinition, Vector3 position, double width, double height)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageDefinition | imageDefinition | Image definition. |
| Vector3 | position | Image Vector3 in world coordinates. |
| System.Double | width | Image width in world coordinates. |
| System.Double | height | Image height in world coordinates. |
Properties
| Improve this Doc View SourceBrightness
Gets or sets the brightness value (0-100; default = 50)
Declaration
public short Brightness { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Clipping
Gets or sets the clipping state: false = off, true = on.
Declaration
public bool Clipping { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ClippingBoundary
Gets or sets the image clipping boundary.
Declaration
public ClippingBoundary ClippingBoundary { get; set; }
Property Value
| Type | Description |
|---|---|
| ClippingBoundary |
Remarks
The vertexes coordinates of the clipping boundary are expressed in local coordinates of the image in pixels. Set as null to restore the default clipping boundary, full image.
Contrast
Gets or sets the contrast value (0-100; default = 50)
Declaration
public short Contrast { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Definition
Gets the ImageDefinition.
Declaration
public ImageDefinition Definition { get; }
Property Value
| Type | Description |
|---|---|
| ImageDefinition |
DisplayOptions
Gets or sets the image display options.
Declaration
public ImageDisplayFlags DisplayOptions { get; set; }
Property Value
| Type | Description |
|---|---|
| ImageDisplayFlags |
Fade
Gets or sets the fade value (0-100; default = 0)
Declaration
public short Fade { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Height
Gets or sets the height of the image in drawing units.
Declaration
public double Height { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Position
Gets or sets the image Vector3 in world coordinates.
Declaration
public Vector3 Position { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Rotation
Gets or sets the image rotation in degrees.
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Remarks
The image rotation is the angle of the U-vector.
Uvector
Gets or sets the image Vector2.
Declaration
public Vector2 Uvector { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Vvector
Gets or sets the image Vector2.
Declaration
public Vector2 Vvector { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Width
Gets or sets the width of the image in drawing units.
Declaration
public double Width { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Methods
| Improve this Doc View SourceClone()
Creates a new Image that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Image 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
Matrix3 adopts the convention of using column vectors to represent a transformation matrix.