> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# CaptionRectangle

A display rectangle, expressed as percentages of the underlying video frame, for captions converted to EBU-TT-D or TTML.

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/caption-selector.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-medialive-alpha/lib/caption-selector.ts#L165)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as medialive_alpha from '@aws-cdk/aws-medialive-alpha';
const captionRectangle: medialive_alpha.CaptionRectangle = {
  height: 123,
  leftOffset: 123,
  topOffset: 123,
  width: 123,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive_alpha as medialive_alpha

caption_rectangle = medialive_alpha.CaptionRectangle(
    height=123,
    left_offset=123,
    top_offset=123,
    width=123
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.medialive.alpha.*;

CaptionRectangle captionRectangle = CaptionRectangle.builder()
        .height(123)
        .leftOffset(123)
        .topOffset(123)
        .width(123)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaLive.Alpha;

var captionRectangle = new CaptionRectangle {
    Height = 123,
    LeftOffset = 123,
    TopOffset = 123,
    Width = 123
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import medialive_alpha "github.com/aws/aws-cdk-go/awsmedialivealpha"

captionRectangle := &CaptionRectangle{
	Height: jsii.Number(123),
	LeftOffset: jsii.Number(123),
	TopOffset: jsii.Number(123),
	Width: jsii.Number(123),
}
```

## Properties

- `height`: number (required) — Height of the rectangle, as a percentage of the frame height (0–100).

- `leftOffset`: number (required) — Left edge position, as a percentage of the frame width (0–100).

- `topOffset`: number (required) — Top edge position, as a percentage of the frame height (0–100).

- `width`: number (required) — Width of the rectangle, as a percentage of the frame width (0–100).
