## Unit class

Provides the base class for units of measurement.

```java
public abstract class Unit : IEquatable<Unit>
```

## Properties

| Name | Description |
| --- | --- |
| [getUnitType](../../com.aspose.html.drawing/unit/unittype/) Gets the unit type of the `Unit`. |

## Methods

| Name | Description |
| --- | --- |
| [equals](../../com.aspose.html.drawing/unit/equals/#equals_1)(object) | Determines whether the specified Object, is equal to this instance. |
| [equals](../../com.aspose.html.drawing/unit/equals/#equals)(Unit) | Determines whether the specified `Unit`, is equal to this instance. |
| [getHashCode](../../com.aspose.html.drawing/unit/gethashcode/)() | Returns a hash code for this instance. |
| [toString](../../com.aspose.html.drawing/unit/toString/)() | Returns a String that represents this instance. |
| static [FromCentimeters](../../com.aspose.html.drawing/unit/fromcentimeters/)(double) | Returns a [`Length`](../length/) object that is represented in centimeters. |
| static [FromDegrees](../../com.aspose.html.drawing/unit/fromdegrees/)(double) | Returns a [`Angle`](../angle/) object that is represented in degrees. |
| static [FromDotsPerCentimeters](../../com.aspose.html.drawing/unit/fromdotspercentimeters/)(double) | Returns a [`Resolution`](../resolution/) object that is represented in dots per centimeters. |
| static [FromDotsPerInch](../../com.aspose.html.drawing/unit/fromdotsperinch/)(double) | Returns a [`Resolution`](../resolution/) object that is represented in dots per inch. |
| static [FromDotsPerPixel](../../com.aspose.html.drawing/unit/fromdotsperpixel/)(double) | Returns a [`Resolution`](../resolution/) object that is represented in dots per pixels. |
| static [FromGradians](../../com.aspose.html.drawing/unit/fromgradians/)(double) | Returns a [`Angle`](../angle/) object that is represented in gradians. |
| static [FromHertz](../../com.aspose.html.drawing/unit/fromhertz/)(double) | Returns a [`Frequency`](../frequency/) object that is represented in hertz. |
| static [FromInches](../../com.aspose.html.drawing/unit/frominches/)(double) | Returns a [`Length`](../length/) object that is represented in inches. |
| static [FromKiloHertz](../../com.aspose.html.drawing/unit/fromkilohertz/)(double) | Returns a [`Frequency`](../frequency/) object that is represented in kiloHertz. |
| static [FromMillimeters](../../com.aspose.html.drawing/unit/frommillimeters/)(double) | Returns a [`Length`](../length/) object that is represented in millimeters. |
| static [FromMilliseconds](../../com.aspose.html.drawing/unit/frommilliseconds/)(double) | Returns a [`Time`](../time/) object that is represented in milliseconds. |
| static [FromPicas](../../com.aspose.html.drawing/unit/frompicas/)(double) | Returns a [`Length`](../length/) object that is represented in picas. |
| static [FromPixels](../../com.aspose.html.drawing/unit/frompixels/)(double) | Returns a [`Length`](../length/) object that is represented in pixels. |
| static [FromPoints](../../com.aspose.html.drawing/unit/frompoints/)(double) | Returns a [`Length`](../length/) object that is represented in points. |
| static [FromQuarterMillimeters](../../com.aspose.html.drawing/unit/fromquartermillimeters/)(double) | Returns a [`Length`](../length/) object that is represented in quarter-millimeters. |
| static [FromRadians](../../com.aspose.html.drawing/unit/fromradians/)(double) | Returns a [`Angle`](../angle/) object that is represented in radians. |
| static [FromSeconds](../../com.aspose.html.drawing/unit/fromseconds/)(double) | Returns a [`Time`](../time/) object that is represented in seconds. |
| static [FromTurns](../../com.aspose.html.drawing/unit/fromturns/)(double) | Returns a [`Angle`](../angle/) object that is represented in turns. |

### See Also

* package [com.aspose.html.drawing](../../com.aspose.html.drawing/)
* package [Aspose.HTML](../../)
