Click or drag to resize

PdfUnitConvertor Class

Class allowing to convert different unit metrics. Converting is based on Graphics object DPI settings that is why for differ graphics settings must be created new instance. For example: printers often has 300 and greater dpi resolution, for compare default display screen dpi is 96.
Inheritance Hierarchy
System Object
Spire.Pdf.Graphics PdfUnitConvertor

Namespace: Spire.Pdf.Graphics
Assembly: Spire.Pdf (in Spire.Pdf.dll) Version: 11.3.7.0 (11.3.7.1046)
Syntax
public class PdfUnitConvertor

The PdfUnitConvertor type exposes the following members.

Constructors
Name Description
Public method PdfUnitConvertor
Initializes a new instance of the PdfUnitConvertor class
Public method PdfUnitConvertor(Graphics)
Initializes a new instance of the PdfUnitConvertor class
Public method PdfUnitConvertor(Single)
Initializes a new instance of the PdfUnitConvertor class
Top
Methods
Name Description
Public method ConvertFromPixels(PointF, PdfGraphicsUnit)
Converts rectangle from pixels to specified units
Public method ConvertFromPixels(RectangleF, PdfGraphicsUnit)
Converts rectangle in Pixels into rectangle with specified measure units
Public method ConvertFromPixels(SizeF, PdfGraphicsUnit)
Converts Size in pixels to size in specified measure units
Public method ConvertFromPixels(Single, PdfGraphicsUnit)
Converts value, stored in pixels, to value in "to" units
Public method ConvertToPixels(PointF, PdfGraphicsUnit)
Converts point from specified measure units to pixels
Public method ConvertToPixels(RectangleF, PdfGraphicsUnit)
Converts the rectangle location and size to Pixels from specified measure units
Public method ConvertToPixels(SizeF, PdfGraphicsUnit)
Converts size from specified measure units to pixels
Public method ConvertToPixels(Single, PdfGraphicsUnit)
Converts the value, stored in "from" units, to pixels
Public method ConvertUnits
Converts the value, stored in "from" units, to value in "to" units
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object .)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Top
See Also