Show / Hide Table of Contents

Class ImageDefinition

Represents an image definition.

Inheritance
System.Object
DxfObject
TableObject
ImageDefinition
Implements
IHasXData
System.ICloneable
System.IComparable
System.IComparable<TableObject>
System.IEquatable<TableObject>
Inherited Members
TableObject.NameChanged
TableObject.OnNameChangedEvent(String, String)
TableObject.XDataAddAppReg
TableObject.OnXDataAddAppRegEvent(ApplicationRegistry)
TableObject.XDataRemoveAppReg
TableObject.OnXDataRemoveAppRegEvent(ApplicationRegistry)
TableObject.Name
TableObject.IsReserved
TableObject.InvalidCharacters
TableObject.XData
TableObject.IsValidName(String)
TableObject.ToString()
TableObject.CompareTo(Object)
TableObject.CompareTo(TableObject)
TableObject.GetHashCode()
TableObject.Equals(Object)
TableObject.Equals(TableObject)
DxfObject.CodeName
DxfObject.Handle
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Objects
Assembly: CADability.dll
Syntax
public class ImageDefinition : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>

Constructors

| Improve this Doc View Source

ImageDefinition(String)

Initializes a new instance of the ImageDefinition class.

Declaration
public ImageDefinition(string file)
Parameters
Type Name Description
System.String file

Image file name with full or relative path.

Remarks

The name of the file without extension will be used as the name of the image definition.

Supported image formats: BMP, JPG, PNG, TIFF.
Even thought AutoCAD supports more image formats, this constructor is restricted to the ones the net framework supports in common with AutoCAD. Use the generic constructor instead.

Note (this is from the ACAD docs): AutoCAD 2000, AutoCAD LT 2000, and later releases do not support LZW-compressed TIFF files, with the exception of English language versions sold in the US and Canada.
If you have TIFF files that were created using LZW compression and want to insert them into a drawing you must save the TIFF files with LZW compression disabled.

| Improve this Doc View Source

ImageDefinition(String, Int32, Double, Int32, Double, ImageResolutionUnits)

Initializes a new instance of the ImageDefinition class.

Declaration
public ImageDefinition(string file, int width, double horizontalResolution, int height, double verticalResolution, ImageResolutionUnits units)
Parameters
Type Name Description
System.String file

Image file name with full or relative path.

System.Int32 width

Image width in pixels.

System.Double horizontalResolution

Image horizontal resolution in pixels.

System.Int32 height

Image height in pixels.

System.Double verticalResolution

Image vertical resolution in pixels.

ImageResolutionUnits units

Image resolution units.

Remarks

The name of the file without extension will be used as the name of the image definition.

This is a generic constructor for all image formats supported by AutoCAD, note that not all AutoCAD versions support the same image formats.

Note (this is from the ACAD docs): AutoCAD 2000, AutoCAD LT 2000, and later releases do not support LZW-compressed TIFF files, with the exception of English language versions sold in the US and Canada.
If you have TIFF files that were created using LZW compression and want to insert them into a drawing you must save the TIFF files with LZW compression disabled.

| Improve this Doc View Source

ImageDefinition(String, String)

Initializes a new instance of the ImageDefinition class.

Declaration
public ImageDefinition(string name, string file)
Parameters
Type Name Description
System.String name

Image definition name.

System.String file

Image file name with full or relative path.

Remarks

The name assigned to the image definition must be unique.

Supported image formats: BMP, JPG, PNG, TIFF.
Even thought AutoCAD supports more image formats, this constructor is restricted to the ones the .net library supports in common with AutoCAD. Use the generic constructor instead.

Note (this is from the ACAD docs): AutoCAD 2000, AutoCAD LT 2000, and later releases do not support LZW-compressed TIFF files, with the exception of English language versions sold in the US and Canada.
If you have TIFF files that were created using LZW compression and want to insert them into a drawing you must save the TIFF files with LZW compression disabled.

| Improve this Doc View Source

ImageDefinition(String, String, Int32, Double, Int32, Double, ImageResolutionUnits)

Initializes a new instance of the ImageDefinition class.

Declaration
public ImageDefinition(string name, string file, int width, double horizontalResolution, int height, double verticalResolution, ImageResolutionUnits units)
Parameters
Type Name Description
System.String name

Image definition name.

System.String file

Image file name with full or relative path.

System.Int32 width

Image width in pixels.

System.Double horizontalResolution

Image horizontal resolution in pixels.

System.Int32 height

Image height in pixels.

System.Double verticalResolution

Image vertical resolution in pixels.

ImageResolutionUnits units

Image resolution units.

Remarks

The name assigned to the image definition must be unique.

This is a generic constructor for all image formats supported by AutoCAD, note that not all AutoCAD versions support the same image formats.

Note (this is from the ACAD docs): AutoCAD 2000, AutoCAD LT 2000, and later releases do not support LZW-compressed TIFF files, with the exception of English language versions sold in the US and Canada.
If you have TIFF files that were created using LZW compression and want to insert them into a drawing you must save the TIFF files with LZW compression disabled.

Properties

| Improve this Doc View Source

File

Gets the image file.

Declaration
public string File { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Height

Gets the image height in pixels.

Declaration
public int Height { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

HorizontalResolution

Gets the image horizontal resolution in pixels per unit.

Declaration
public double HorizontalResolution { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Owner

Gets the owner of the actual image definition.

Declaration
public ImageDefinitions Owner { get; }
Property Value
Type Description
ImageDefinitions
| Improve this Doc View Source

ResolutionUnits

Gets or sets the image resolution units.

Declaration
public ImageResolutionUnits ResolutionUnits { get; set; }
Property Value
Type Description
ImageResolutionUnits
| Improve this Doc View Source

VerticalResolution

Gets the image vertical resolution in pixels per unit.

Declaration
public double VerticalResolution { get; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

Width

Gets the image width in pixels.

Declaration
public int Width { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

Clone()

Creates a new ImageDefinition that is a copy of the current instance.

Declaration
public override object Clone()
Returns
Type Description
System.Object

A new ImageDefinition that is a copy of this instance.

Overrides
TableObject.Clone()
| Improve this Doc View Source

Clone(String)

Creates a new ImageDefinition that is a copy of the current instance.

Declaration
public override TableObject Clone(string newName)
Parameters
Type Name Description
System.String newName

ImageDefinition name of the copy.

Returns
Type Description
TableObject

A new ImageDefinition that is a copy of this instance.

Overrides
TableObject.Clone(String)

Implements

IHasXData
System.ICloneable
System.IComparable
System.IComparable<T>
System.IEquatable<T>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX