# ContentLauncherTrait.DimensionStruct

# ContentLauncherTrait.DimensionStruct


```
class ContentLauncherTrait.DimensionStruct : ClusterStruct
```

<br />

*** ** * ** ***

A set of dimensions for a background image.

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct.StructFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct#DimensionStruct(kotlin.Double,kotlin.Double,com.google.home.matter.standard.ContentLauncherTrait.MetricTypeEnum)( width: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html, height: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html, metric: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.MetricTypeEnum )` Creates the DimensionStruct class. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct#height()` The height, using the metric specified by the `metric` field. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.MetricTypeEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct#metric()` The unit of measurement used for defining the dimensions. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-double/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.DimensionStruct#width()` The width, using the metric specified by the `metric` field. |

## Public constructors

### DimensionStruct

```
DimensionStruct(
    width: Double = 0.0,
    height: Double = 0.0,
    metric: ContentLauncherTrait.MetricTypeEnum = MetricTypeEnum.Pixels
)
```

Creates the DimensionStruct class.

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### height

```
val height: Double
```

The height, using the metric specified by the `metric` field.

### metric

```
val metric: ContentLauncherTrait.MetricTypeEnum
```

The unit of measurement used for defining the dimensions. If the metric is `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ContentLauncherTrait.MetricTypeEnum#Percentage`, the dimensions are expressed in terms of a percentage of the overall display dimensions. For example, a percentage width measurement of 50.0 against a display width of 1920 pixels would mean that the width in pixels is 960, which is 50.0% of 1920.

### width

```
val width: Double
```

The width, using the metric specified by the `metric` field.