Skip to main content

Units Methods

Helper class with static methods used for unit conversion.
Name Description
CentimetersToDocumentsF(Single) static Converts a measurement from centimeters to documents. Returns the converted measurement as a Single.
CentimetersToTwipsF(Single) static Converts a measurement from centimeters to twips. Returns the converted measurement as a Single.
DocumentsToCentimetersF(Single) static Converts a measurement from documents to centimeters. Returns the converted measurement as a Single.
DocumentsToEmu(Int32) static Converts the specified value in documents to English Metric Units (EMUs).
DocumentsToEmuD(Single) static Converts a measurement from EMUs (English Metric Unit) to documents (double-precision floating point value).
DocumentsToEmuF(Single) static Converts a measurement from EMUs (English Metric Unit) to documents represented by 64-bit integers.
DocumentsToEmuL(Int64) static Converts a measurement from document units (documents) to EMUs (English Metric Unit) represented by 64-bit integers.
DocumentsToHundredthsOfInch(Size) static Converts the specified value in documents to hundredths of an inch.
DocumentsToHundredthsOfInch(Int32) static Converts the specified value in documents to hundredths of an inch.
DocumentsToHundredthsOfMillimeter(Size) static Converts the specified value in documents to hundredths of millimeters.
DocumentsToHundredthsOfMillimeter(Int32) static Converts the specified value in documents to hundredths of millimeters.
DocumentsToInchesF(Single) static Converts a measurement from documents to inches. Returns the converted measurement as a Single.
DocumentsToMillimetersF(Single) static Converts a measurement from documents to millimeters. Returns the converted measurement as a Single.
DocumentsToPicasF(Single) static Converts a measurement from documents to picas. Returns the converted measurement as a Single.
DocumentsToPixels(Point, Single, Single) static Converts the specified value in documents to pixels.
DocumentsToPixels(Rectangle, Single, Single) static Converts the specified value in documents to pixels.
DocumentsToPixels(RectangleF, Single, Single) static Converts a rectangle from documents to pixels.
DocumentsToPixels(Size, Single, Single) static Converts the specified value in documents to pixels.
DocumentsToPixels(Int32, Single) static Converts the specified value in documents to pixels.
DocumentsToPixelsF(Single, Single) static Converts a measurement from documents to pixels. Returns the converted measurement as a Double.
DocumentsToPoints(Int32) static Converts a value in documents to points.
DocumentsToPointsF(Single) static Converts a measurement from documents to points. Returns the converted measurement as a Single.
DocumentsToPointsFRound(Single) static Converts a measurement from documents to points and rounds the result. Returns the converted measurement as a Single.
DocumentsToTwips(Rectangle) static Converts a value in documents to twips.
DocumentsToTwips(RectangleF) static Converts measurements from documents to twips.
DocumentsToTwips(Size) static Converts a value in documents to twips.
DocumentsToTwips(Int32) static Converts a value in documents to twips.
DocumentsToTwipsF(Single) static Converts a measurement from documents to twips. Returns the converted measurement as a Single.
DocumentsToTwipsL(Int64) static Converts measurements from 64-bit signed integers to twips.
EmuToDocuments(Int32) static Converts a value in EMUs to documents.
EmuToDocumentsD(Double) static Converts a measurement from EMUs (double-precision floating point value) to documents (floating point value).
EmuToDocumentsF(Single) static Converts a value in EMUs to documents.
EmuToDocumentsL(Int64) static Converts a measurement from EMUs (English Metric Unit) to documents represented by 64-bit integers.
EmuToTwips(Int32) static Converts a value in EMUs to twips.
EmuToTwipsD(Double) static Converts a measurement from EMUs (double-precision floating point value) to twips (floating point value).
EmuToTwipsF(Single) static Converts a value in EMUs to twips.
EmuToTwipsL(Int64) static Converts a measurement from EMUs (English Metric Unit) to twips represented by 64-bit integers.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetType() Gets the Type of the current instance. Inherited from Object.
HundredthsOfInchToDocuments(Size) static Converts a value in hundredths of an inch to documents.
HundredthsOfInchToDocuments(Int32) static Converts a value in hundredths of an inch to a value in documents.
HundredthsOfInchToTwips(Size) static Converts a value in hundredths of an inch to a value in twips.
HundredthsOfInchToTwips(Int32) static Converts a value in hundredths of an inch to a value in twips.
HundredthsOfMillimeterToDocuments(Size) static Converts a value in hundredths of a millimeter to a value in documents.
HundredthsOfMillimeterToDocuments(Int32) static Converts a value in hundredths of a millimeter to a value in documents.
HundredthsOfMillimeterToDocumentsRound(Size) static Converts measurements from hundredths of a millimeter to documents and rounds them to the nearest whole value.
HundredthsOfMillimeterToPixels(Size, Single, Single) static Converts a value in hundredths of millimeters to pixels.
HundredthsOfMillimeterToPixels(Int32, Single) static Converts a value in hundredths of millimeters to pixels.
HundredthsOfMillimeterToTwips(Size) static Converts a value in hundredths of millimeters to twips.
HundredthsOfMillimeterToTwips(Int32) static Converts a value in hundredths of millimeters to twips.
HundredthsOfMillimeterToTwipsRound(Size) static Converts measurements from hundredths of a millimeter to twips and rounds them to the whole number nearest to the twip value.
InchesToDocumentsF(Single) static Converts a measurement from inches to documents. Returns the converted measurement as a Single.
InchesToPointsF(Single) static Converts a measurement from inches to points. Returns the converted measurement as a Single.
InchesToTwipsF(Single) static Converts a measurement from inches to twips. Returns the converted measurement as a Single.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
MillimetersToDocumentsF(Single) static Converts a measurement from millimeters to documents. Returns the converted measurement as a Single.
MillimetersToPoints(Int32) static Converts a value in millimeters to points.
MillimetersToPointsF(Single) static Converts a measurement from millimeters to points. Returns the converted measurement as a Single.
MillimetersToTwipsF(Single) static Converts a measurement from millimeters to twips. Returns the converted measurement as a Single.
MulDiv(Int32, Int32, Int32) static Multiplies two 32-bit integers and then divides the 64-bit result by a third 32-bit integer.
MulDiv(Int32, Int32, Single) static Multiplies two 32-bit integers and then divides the 64-bit result by a third 32-bit integer.
MulDiv(Int32, Single, Single) static Multiplies a 32-bit integer by a single-precision floating-point number and then divides the result by another single-precision floating-point number.
MulDivD(Double, Double, Double) static Multiplies two double-precision floating-point values and then divides the result by another double-precision floating-point value. The final result is cast to a Double (rounded to the nearest integer dropping the values after the decimal place).
MulDivF(Single, Single, Single) static Multiplies two floating point values and then divides the result by another floating point value.
PicasToDocumentsF(Single) static Converts a measurement from picas to documents. Returns the converted measurement as a Single.
PicasToTwipsF(Single) static Converts a measurement from picas to twips. Returns the converted measurement as a Single.
PixelsToDocuments(Double, Single) static Converts a measurement from pixels to documents. Returns the converted measurement as an Integer.
PixelsToDocuments(Point, Single, Single) static Converts point coordinates from pixels to documents.
PixelsToDocuments(Rectangle, Single, Single) static Converts a rectangle from pixels to documents.
PixelsToDocuments(RectangleF, Single, Single) static Converts rectangle coordinates from pixels to documents.
PixelsToDocuments(Size, Single, Single) static Converts a size in pixels to a size in document units, using the specified horizontal and vertical DPI values.
PixelsToDocuments(Int32, Single) static Converts a measurement from pixels to documents. Returns the converted measurement as an Integer.
PixelsToDocumentsF(SizeF, Single, Single) static Converts a measurement from pixels to documents. Returns the converted measurement as a SizeF.
PixelsToDocumentsF(Single, Single) static Converts a measurement from pixels to documents. Returns the converted measurement as a Single.
PixelsToDocumentsRound(Size, Single, Single) static Converts measurements from pixels to documents and rounds them to the nearest whole number.
PixelsToHundredthsOfInch(Size, Single) static Converts a size in pixels to a size in hundredths of an inch, using the specified DPI value.
PixelsToHundredthsOfInch(Int32, Single) static Converts a value in pixels to hundredths of an inch, using the specified DPI value.
PixelsToHundredthsOfMillimeter(Size, Single, Single) static Converts pixels to hundredths of millimeters.
PixelsToHundredthsOfMillimeter(Int32, Single) static Converts pixels to hundredths of millimeters.
PixelsToPoints(Int32, Single) static Converts a measurement from pixels to points.
PixelsToPointsF(Single, Single) static Converts a measurement from pixels to points.
PixelsToTwips(Rectangle, Single, Single) static Converts pixels to twips.
PixelsToTwips(RectangleF, Single, Single) static Converts pixels to twips.
PixelsToTwips(Size, Single, Single) static Converts pixels to twips.
PixelsToTwips(Int32, Single) static Converts pixels to twips.
PixelsToTwipsF(SizeF, Single, Single) static Converts a measurement from pixels to twips. Returns the converted measurement as a SizeF.
PixelsToTwipsF(Single, Single) static Converts a measurement from pixels to twips. Returns the converted measurement as a Single.
PixelsToTwipsL(Int64, Single) static Converts a measurement from pixels to twips. Returns the converted measurement as an Int64.
PixelsToTwipsRound(Size, Single, Single) static Converts measurements from pixels to twips and rounds their values to the nearest whole number.
PointsToDocuments(Int32) static Converts a value in points to documents.
PointsToDocumentsF(Single) static Converts a measurement from points to documents. Returns the converted measurement as a Single.
PointsToPixels(Int32, Single) static Converts a value in points to pixels.
PointsToPixelsF(Single, Single) static Converts a measurement from points to pixels. Returns the converted measurement as a Single.
PointsToTwips(Int32) static Converts a measurement from points to twips. Returns the converted measurement as an Integer.
PointsToTwipsF(Single) static Converts a measurement from points to twips. Returns the converted measurement as a Single.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
RoundDocumentsToPixels(Int32, Single) static Converts point coordinates from documents (the value is rounded) to pixels.
RoundTwipsToPixels(Int32, Single) static Converts a measurement from twips (the value is rounded) to pixels.
ToString() Returns a string that represents the current object. Inherited from Object.
TwipsToCentimetersF(Single) static Converts a measurement from twips to centimeters. Returns the converted measurement as a Single.
TwipsToDocuments(Rectangle) static Converts a value in twips to documents.
TwipsToDocuments(RectangleF) static Converts rectangle coordinates from twips to documents.
TwipsToDocuments(Size) static Converts a value in twips to documents.
TwipsToDocuments(Int32) static Converts a value in twips to documents.
TwipsToDocumentsF(Single) static Converts a measurement from twips to documents. Returns the converted measurement as a Single.
TwipsToDocumentsL(Int64) static Converts a measurement from twips to documents. Returns the converted measurement as an Int64.
TwipsToEmu(Int32) static Converts a value in twips to EMUs.
TwipsToEmuD(Single) static Converts a measurement from twips (floating point value) to EMUs (double-precision floating point value).
TwipsToEmuF(Single) static Converts a measurement from twips (floating point value) to EMUs (English Metric Unit).
TwipsToEmuL(Int64) static Converts a measurement from twips to EMUs (English Metric Unit) represented by 64-bit integers.
TwipsToHundredthsOfInch(Size) static Converts a value in twips to hundredths of inches.
TwipsToHundredthsOfInch(Int32) static Converts a value in twips to hundredths of inches.
TwipsToHundredthsOfMillimeter(Size) static Converts a value in twips to hundredths of millimeters.
TwipsToInchesF(Single) static Converts a measurement from twips to inches. Returns the converted measurement as a Single.
TwipsToMillimetersF(Single) static Converts a measurement from twips to millimeters. Returns the converted measurement as a Single.
TwipsToPixels(Point, Single, Single) static Converts a value in twips to pixels.
TwipsToPixels(Rectangle, Single, Single) static Converts a value in twips to pixels.
TwipsToPixels(Size, Single, Single) static Converts a value in twips to pixels.
TwipsToPixels(Int32, Single) static Converts a measurement from twips to pixels. Returns the converted measurement as an Integer.
TwipsToPixelsF(Single, Single) static Converts a measurement from twips to pixels. Returns the converted measurement as a Single.
TwipsToPixelsL(Int64, Single) static Converts a measurement from twips to pixels. Returns the converted measurement as an Int64.
TwipsToPointsF(Single) static Converts a measurement from twips to points. Returns the converted measurement as a Single.
TwipsToPointsFRound(Single) static Converts a measurement from twips to points and rounds the result. Returns the converted measurement as a Single.
See Also