Show / Hide Table of Contents

Class UnitHelper

Helper methods for unit conversion.

Inheritance
System.Object
UnitHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: netDxf.Units
Assembly: CADability.dll
Syntax
public static class UnitHelper

Methods

| Improve this Doc View Source

ConversionFactor(DrawingUnits, DrawingUnits)

Gets the conversion factor between drawing units.

Declaration
public static double ConversionFactor(DrawingUnits from, DrawingUnits to)
Parameters
Type Name Description
DrawingUnits from

Original drawing units.

DrawingUnits to

Destination drawing units.

Returns
Type Description
System.Double

The conversion factor between the drawing units.

| Improve this Doc View Source

ConversionFactor(DrawingUnits, ImageUnits)

Gets the conversion factor between units.

Declaration
public static double ConversionFactor(DrawingUnits from, ImageUnits to)
Parameters
Type Name Description
DrawingUnits from

Original value units.

ImageUnits to

Destination value units.

Returns
Type Description
System.Double

The conversion factor between the passed units.

| Improve this Doc View Source

ConversionFactor(ImageUnits, DrawingUnits)

Gets the conversion factor between image and drawing units.

Declaration
public static double ConversionFactor(ImageUnits from, DrawingUnits to)
Parameters
Type Name Description
ImageUnits from

Original image units.

DrawingUnits to

Destination drawing units.

Returns
Type Description
System.Double

The conversion factor between the units.

| Improve this Doc View Source

ConvertUnit(Double, DrawingUnits, DrawingUnits)

Converts a value from one drawing unit to another.

Declaration
public static double ConvertUnit(double value, DrawingUnits from, DrawingUnits to)
Parameters
Type Name Description
System.Double value

Number to convert.

DrawingUnits from

Original drawing units.

DrawingUnits to

Destination drawing units.

Returns
Type Description
System.Double

The converted value to the new drawing units.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX