Skip to end of metadata
Go to start of metadata

Represents a base class for report units.

Definition

public abstract class Unit

Summary

The following table summarizes the members exposed in this class.

Protected Constructors

Public Properties

Factor Gets the ruler scale in hundredths of inch on the one step.
RollerStep Gets ruler step.
ShortName Gets the short unit name.

Fields

Centimeters Gets the default instance for Centimeters unit.
HundredthsOfInch Gets the default instance for HundredthsOfInch unit.
Inches Gets the default instance for Inches unit.
Millimeters Gets the default instance for Millimeters unit.

Static Methods

GetUnitFromReportUnit(UnitType) Gets the corresponding report unit from the specified unit type.

Public Methods

ConvertFromHInches(double) Converts a value from hundredths of inch into units of this class.
ConvertFromHInches(RectD) Converts a rectangle from hundredths of inch into units of this class.
ConvertFromHInches(SizeD) Converts a size from hundredths of inch into units of this class.
ConvertToHInches(double) Converts a value from hundredths of inch into units of this class.
ConvertToHInches(RectD) Converts a rectangle from units of this class into hundredths of inch.
ConvertToHInches(SizeD) Converts a size from units of this class into hundredths of inch.

Protected Constructors

protected Unit()

Public Properties

public double Factor { get; }

Gets the ruler scale in hundredths of inch on the one step.

public double RollerStep { get; }

Gets ruler step.

public string ShortName { get; }

Gets the short unit name.

Fields

public static CentimetersUnit Centimeters

Gets the default instance for Centimeters unit.

public static HundredthsOfInchUnit HundredthsOfInch

Gets the default instance for HundredthsOfInch unit.

public static InchesUnit Inches

Gets the default instance for Inches unit.

public static MillimetersUnit Millimeters

Gets the default instance for Millimeters unit.

Static Methods

public static Unit GetUnitFromReportUnit(UnitType reportUnit)

Gets the corresponding report unit from the specified unit type.

Parameters

reportUnit The unit type.

Return Types

The report unit.

Public Methods

public double ConvertFromHInches(double value)

Converts a value from hundredths of inch into units of this class.

Parameters

value Value for conversion.

Return Types

Converted value.

public RectD ConvertFromHInches(RectD rect)

Converts a rectangle from hundredths of inch into units of this class.

Parameters

rect Rectangle for conversion.

Return Types

Converted rectangle.

public SizeD ConvertFromHInches(SizeD size)

Converts a size from hundredths of inch into units of this class.

Parameters

size Size for conversion.

Return Types

Converted size.

public double ConvertToHInches(double value)

Converts a value from hundredths of inch into units of this class.

Parameters

value Value for conversion.

Return Types

Converted value.

public RectD ConvertToHInches(RectD rect)

Converts a rectangle from units of this class into hundredths of inch.

Parameters

rect Rectangle for conversion.

Return Types

Converted rectangle.

public SizeD ConvertToHInches(SizeD size)

Converts a size from units of this class into hundredths of inch.

Parameters

size Size for conversion.

Return Types

Converted size.
  • No labels