# CompositionStrokeCap

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/enum-compositionstrokecap/

**enum** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
enum CompositionStrokeCap
```

The shape at an end of a stroke or of a dash (WinUI
`CompositionStrokeCap`).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_shape.rs#L35)

## Members

- [`Flat`](#variant-flat)
- [`Square`](#variant-square)
- [`Round`](#variant-round)
- [`Triangle`](#variant-triangle)
- [`to_pen_line_cap`](#function-to_pen_line_cap)

<a id="variant-flat"></a>

### Flat

```rust
Flat = 0
```

The stroke ends at the end point.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_shape.rs#L38)

<a id="variant-square"></a>

### Square

```rust
Square = 1
```

A square half the thickness long beyond the end point.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_shape.rs#L40)

<a id="variant-round"></a>

### Round

```rust
Round = 2
```

A half circle beyond the end point.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_shape.rs#L42)

<a id="variant-triangle"></a>

### Triangle

```rust
Triangle = 3
```

A triangle half the thickness high beyond the end point.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_shape.rs#L44)

<a id="function-to_pen_line_cap"></a>

### to_pen_line_cap

```rust
fn to_pen_line_cap(self: Self) -> PenLineCap
```

The line cap of the platform pen.

Deviation (winui-composition.md): the pens of FerroUI have no
triangle cap; `Triangle` is drawn as `Round`, the cap that comes
closest.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_shape.rs#L53)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `BatchValue`
- `ServerPropertyValue`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
