**Inheritance:**
java.lang.Object, [com.aspose.imaging.xmp.types.XmpTypeBase](../../com.aspose.imaging.xmp.types/xmptypebase), [com.aspose.imaging.xmp.types.complex.ComplexTypeBase](../../com.aspose.imaging.xmp.types.complex/complextypebase)
```
public final class Dimensions extends ComplexTypeBase
```

Containing dimensions for a drawn object.
## Constructors

| Constructor | Description |
| --- | --- |
| [Dimensions()](#Dimensions--) | Initializes a new instance of the `Dimensions` class. |
| [Dimensions(float width, float height)](#Dimensions-float-float-) | Initializes a new instance of the `Dimensions` class. |
## Methods

| Method | Description |
| --- | --- |
| [getWidth()](#getWidth--) | Gets or sets the width. |
| [setWidth(float value)](#setWidth-float-) | Gets or sets the width. |
| [getHeight()](#getHeight--) | Gets or sets the height. |
| [setHeight(float value)](#setHeight-float-) | Gets or sets the height. |
| [getUnits()](#getUnits--) | Gets or sets units. |
| [setUnits(String value)](#setUnits-java.lang.String-) | Gets or sets units. |
| [getXmpRepresentation()](#getXmpRepresentation--) | Gets the string contained value in XMP format. |
### Dimensions() {#Dimensions--}
```
public Dimensions()
```


Initializes a new instance of the `Dimensions` class.

### Dimensions(float width, float height) {#Dimensions-float-float-}
```
public Dimensions(float width, float height)
```


Initializes a new instance of the `Dimensions` class.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| width | float | The width. |
| height | float | The height. |

### getWidth() {#getWidth--}
```
public float getWidth()
```


Gets or sets the width.

**Returns:**
float
### setWidth(float value) {#setWidth-float-}
```
public void setWidth(float value)
```


Gets or sets the width.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | float |  |

### getHeight() {#getHeight--}
```
public float getHeight()
```


Gets or sets the height.

**Returns:**
float
### setHeight(float value) {#setHeight-float-}
```
public void setHeight(float value)
```


Gets or sets the height.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | float |  |

### getUnits() {#getUnits--}
```
public String getUnits()
```


Gets or sets units.

For example: inch, mm, pixel, pica, point etc. Value: The units.

**Returns:**
java.lang.String
### setUnits(String value) {#setUnits-java.lang.String-}
```
public void setUnits(String value)
```


Gets or sets units.

For example: inch, mm, pixel, pica, point etc. Value: The units.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String |  |

### getXmpRepresentation() {#getXmpRepresentation--}
```
public String getXmpRepresentation()
```


Gets the string contained value in XMP format.

**Returns:**
java.lang.String - Returns the string contained value in XMP format.
