PDFKit.NET 5.0 PDFKit.NET 5.0

Struct Unit

Namespace TallComponents.PDF

Unit is used to convert a wide variety of units to points, which is the unit used in PDF.

A point in PDF is exactly 1/72 inch. This is also known as a PostScript point. This class converts all units to PostScript points.

Constructors


Create a Unit from a value. The value is assumed to be in Points.

Create a Unit from a value and a UnitType

Properties


This Unit is a relative value. True if this Unit is a percentage.

Return the value of this Unit in points.

Methods


Determines whether two Object instances are equal.

Create a unit from pixels and a resolution. Useful for working with images.

Calculates a hash for this type.

Create a unit from a string.

Convert a unit string to points

Returns the value of the Unit as a formatted string in points.

Operators


Compares two Unit objects for equality.

Implicit conversion from double. This allows you to assign a double to any variable or property of type Unit without constructors or casting.

Implicit conversion from string. This allows you to assign a sized string to any variable or property of type Unit without constructors or casting.

Implicit conversion to double. The value is expressed in points.

Compares two Unit objects for inequality.