Rediger

Del via


PrinterUnitConvert.Convert Method

Definition

Converts a value from one PrinterUnit type to another PrinterUnit type.

Overloads

Convert(Double, PrinterUnit, PrinterUnit)

Converts a double-precision floating-point number from one PrinterUnit type to another PrinterUnit type.

Convert(Point, PrinterUnit, PrinterUnit)

Converts a Point from one PrinterUnit type to another PrinterUnit type.

Convert(Margins, PrinterUnit, PrinterUnit)

Converts a Margins from one PrinterUnit type to another PrinterUnit type.

Convert(Rectangle, PrinterUnit, PrinterUnit)

Converts a Rectangle from one PrinterUnit type to another PrinterUnit type.

Convert(Size, PrinterUnit, PrinterUnit)

Converts a Size from one PrinterUnit type to another PrinterUnit type.

Convert(Int32, PrinterUnit, PrinterUnit)

Converts a 32-bit signed integer from one PrinterUnit type to another PrinterUnit type.

Convert(Double, PrinterUnit, PrinterUnit)

Source:
PrinterUnitConvert.cs
Source:
PrinterUnitConvert.cs

Converts a double-precision floating-point number from one PrinterUnit type to another PrinterUnit type.

public:
 static double Convert(double value, System::Drawing::Printing::PrinterUnit fromUnit, System::Drawing::Printing::PrinterUnit toUnit);
public static double Convert (double value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit);
static member Convert : double * System.Drawing.Printing.PrinterUnit * System.Drawing.Printing.PrinterUnit -> double
Public Shared Function Convert (value As Double, fromUnit As PrinterUnit, toUnit As PrinterUnit) As Double

Parameters

value
Double

The Point being converted.

fromUnit
PrinterUnit

The unit to convert from.

toUnit
PrinterUnit

The unit to convert to.

Returns

A double-precision floating-point number that represents the converted PrinterUnit.

Remarks

The following table shows the PrinterUnit values.

Value Description
Display The default unit (0.01 in.).
ThousandthsOfAnInch One-thousandth of an inch (0.001 in.).
HundredthsOfAMillimeter One-hundredth of a millimeter (0.01 mm).
TenthsOfAMillimeter One-tenth of a millimeter (0.1 mm).

See also

Applies to

Convert(Point, PrinterUnit, PrinterUnit)

Source:
PrinterUnitConvert.cs
Source:
PrinterUnitConvert.cs

Converts a Point from one PrinterUnit type to another PrinterUnit type.

public:
 static System::Drawing::Point Convert(System::Drawing::Point value, System::Drawing::Printing::PrinterUnit fromUnit, System::Drawing::Printing::PrinterUnit toUnit);
public static System.Drawing.Point Convert (System.Drawing.Point value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit);
static member Convert : System.Drawing.Point * System.Drawing.Printing.PrinterUnit * System.Drawing.Printing.PrinterUnit -> System.Drawing.Point
Public Shared Function Convert (value As Point, fromUnit As PrinterUnit, toUnit As PrinterUnit) As Point

Parameters

value
Point

The Point being converted.

fromUnit
PrinterUnit

The unit to convert from.

toUnit
PrinterUnit

The unit to convert to.

Returns

A Point that represents the converted PrinterUnit.

Remarks

The following table shows the PrinterUnit values.

Value Description
Display The default unit (0.01 in.).
ThousandthsOfAnInch One-thousandth of an inch (0.001 in.).
HundredthsOfAMillimeter One-hundredth of a millimeter (0.01 mm).
TenthsOfAMillimeter One-tenth of a millimeter (0.1 mm).

See also

Applies to

Convert(Margins, PrinterUnit, PrinterUnit)

Source:
PrinterUnitConvert.cs
Source:
PrinterUnitConvert.cs

Converts a Margins from one PrinterUnit type to another PrinterUnit type.

public:
 static System::Drawing::Printing::Margins ^ Convert(System::Drawing::Printing::Margins ^ value, System::Drawing::Printing::PrinterUnit fromUnit, System::Drawing::Printing::PrinterUnit toUnit);
public static System.Drawing.Printing.Margins Convert (System.Drawing.Printing.Margins value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit);
static member Convert : System.Drawing.Printing.Margins * System.Drawing.Printing.PrinterUnit * System.Drawing.Printing.PrinterUnit -> System.Drawing.Printing.Margins
Public Shared Function Convert (value As Margins, fromUnit As PrinterUnit, toUnit As PrinterUnit) As Margins

Parameters

value
Margins

The Margins being converted.

fromUnit
PrinterUnit

The unit to convert from.

toUnit
PrinterUnit

The unit to convert to.

Returns

A Margins that represents the converted PrinterUnit.

Remarks

The following table shows the PrinterUnit values.

Value Description
Display The default unit (0.01 in.).
ThousandthsOfAnInch One-thousandth of an inch (0.001 in.).
HundredthsOfAMillimeter One-hundredth of a millimeter (0.01 mm).
TenthsOfAMillimeter One-tenth of a millimeter (0.1 mm).

See also

Applies to

Convert(Rectangle, PrinterUnit, PrinterUnit)

Source:
PrinterUnitConvert.cs
Source:
PrinterUnitConvert.cs

Converts a Rectangle from one PrinterUnit type to another PrinterUnit type.

public:
 static System::Drawing::Rectangle Convert(System::Drawing::Rectangle value, System::Drawing::Printing::PrinterUnit fromUnit, System::Drawing::Printing::PrinterUnit toUnit);
public static System.Drawing.Rectangle Convert (System.Drawing.Rectangle value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit);
static member Convert : System.Drawing.Rectangle * System.Drawing.Printing.PrinterUnit * System.Drawing.Printing.PrinterUnit -> System.Drawing.Rectangle
Public Shared Function Convert (value As Rectangle, fromUnit As PrinterUnit, toUnit As PrinterUnit) As Rectangle

Parameters

value
Rectangle

The Rectangle being converted.

fromUnit
PrinterUnit

The unit to convert from.

toUnit
PrinterUnit

The unit to convert to.

Returns

A Rectangle that represents the converted PrinterUnit.

Remarks

The following table shows the PrinterUnit values.

Value Description
Display The default unit (0.01 in.).
ThousandthsOfAnInch One-thousandth of an inch (0.001 in.).
HundredthsOfAMillimeter One-hundredth of a millimeter (0.01 mm).
TenthsOfAMillimeter One-tenth of a millimeter (0.1 mm).

See also

Applies to

Convert(Size, PrinterUnit, PrinterUnit)

Source:
PrinterUnitConvert.cs
Source:
PrinterUnitConvert.cs

Converts a Size from one PrinterUnit type to another PrinterUnit type.

public:
 static System::Drawing::Size Convert(System::Drawing::Size value, System::Drawing::Printing::PrinterUnit fromUnit, System::Drawing::Printing::PrinterUnit toUnit);
public static System.Drawing.Size Convert (System.Drawing.Size value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit);
static member Convert : System.Drawing.Size * System.Drawing.Printing.PrinterUnit * System.Drawing.Printing.PrinterUnit -> System.Drawing.Size
Public Shared Function Convert (value As Size, fromUnit As PrinterUnit, toUnit As PrinterUnit) As Size

Parameters

value
Size

The Size being converted.

fromUnit
PrinterUnit

The unit to convert from.

toUnit
PrinterUnit

The unit to convert to.

Returns

A Size that represents the converted PrinterUnit.

Remarks

The following table shows the PrinterUnit values.

Value Description
Display The default unit (0.01 in.).
ThousandthsOfAnInch One-thousandth of an inch (0.001 in.).
HundredthsOfAMillimeter One-hundredth of a millimeter (0.01 mm).
TenthsOfAMillimeter One-tenth of a millimeter (0.1 mm).

See also

Applies to

Convert(Int32, PrinterUnit, PrinterUnit)

Source:
PrinterUnitConvert.cs
Source:
PrinterUnitConvert.cs

Converts a 32-bit signed integer from one PrinterUnit type to another PrinterUnit type.

public:
 static int Convert(int value, System::Drawing::Printing::PrinterUnit fromUnit, System::Drawing::Printing::PrinterUnit toUnit);
public static int Convert (int value, System.Drawing.Printing.PrinterUnit fromUnit, System.Drawing.Printing.PrinterUnit toUnit);
static member Convert : int * System.Drawing.Printing.PrinterUnit * System.Drawing.Printing.PrinterUnit -> int
Public Shared Function Convert (value As Integer, fromUnit As PrinterUnit, toUnit As PrinterUnit) As Integer

Parameters

value
Int32

The value being converted.

fromUnit
PrinterUnit

The unit to convert from.

toUnit
PrinterUnit

The unit to convert to.

Returns

A 32-bit signed integer that represents the converted PrinterUnit.

Remarks

The following table shows the PrinterUnit values.

Value Description
Display The default unit (0.01 in.).
ThousandthsOfAnInch One-thousandth of an inch (0.001 in.).
HundredthsOfAMillimeter One-hundredth of a millimeter (0.01 mm).
TenthsOfAMillimeter One-tenth of a millimeter (0.1 mm).

See also

Applies to