# DrawingGroup

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/struct-drawinggroup/

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

```rust
struct DrawingGroup
```

Represents a collection of drawings that can be operated upon as a single
drawing.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L25)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`opacity_property`](#function-opacity_property)
- [`transform_property`](#function-transform_property)
- [`clip_geometry_property`](#function-clip_geometry_property)
- [`opacity_mask_property`](#function-opacity_mask_property)
- [`effect_property`](#function-effect_property)
- [`children_property`](#function-children_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`opacity`](#function-opacity)
- [`set_opacity`](#function-set_opacity)
- [`transform`](#function-transform)
- [`set_transform`](#function-set_transform)
- [`clip_geometry`](#function-clip_geometry)
- [`set_clip_geometry`](#function-set_clip_geometry)
- [`opacity_mask`](#function-opacity_mask)
- [`set_opacity_mask`](#function-set_opacity_mask)
- [`effect`](#function-effect)
- [`set_effect`](#function-set_effect)
- [`children`](#function-children)
- [`set_children`](#function-set_children)
- [`open`](#function-open)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L36)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<DrawingGroup>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L36)

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

### opacity_property

```rust
fn opacity_property() -> &'static StyledProperty<f64>
```

Defines the `Opacity` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L138)

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

### transform_property

```rust
fn transform_property() -> &'static StyledProperty<Option<Ref<Transform>>>
```

Defines the `Transform` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L138)

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

### clip_geometry_property

```rust
fn clip_geometry_property() -> &'static StyledProperty<Option<Ref<Geometry>>>
```

Defines the `ClipGeometry` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L138)

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

### opacity_mask_property

```rust
fn opacity_mask_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
```

Defines the `OpacityMask` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L138)

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

### effect_property

```rust
fn effect_property() -> &'static StyledProperty<Option<Rc<dyn IEffect>>>
```

Defines the `Effect` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L138)

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

### children_property

```rust
fn children_property() -> &'static DirectProperty<DrawingGroup, DrawingCollection>
```

Defines the `Children` property.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L138)

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

### construct

```rust
fn construct() -> Self
```

Creates the class data.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L189)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L202)

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

### opacity

```rust
fn opacity(self: &Self) -> f64
```

The opacity the children are drawn with.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L207)

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

### set_opacity

```rust
fn set_opacity(self: &Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L211)

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

### transform

```rust
fn transform(self: &Self) -> Option<Ref<Transform>>
```

The transform applied to the children.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L216)

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

### set_transform

```rust
fn set_transform(self: &Self, value: impl Into<Nullable<Transform>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L220)

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

### clip_geometry

```rust
fn clip_geometry(self: &Self) -> Option<Ref<Geometry>>
```

The geometry the children are clipped to.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L225)

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

### set_clip_geometry

```rust
fn set_clip_geometry(self: &Self, value: impl Into<Nullable<Geometry>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L229)

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

### opacity_mask

```rust
fn opacity_mask(self: &Self) -> Option<Rc<dyn IBrush>>
```

The opacity mask the children are drawn through.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L234)

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

### set_opacity_mask

```rust
fn set_opacity_mask(self: &Self, value: Option<Rc<dyn IBrush>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L238)

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

### effect

```rust
fn effect(self: &Self) -> Option<Rc<dyn IEffect>>
```

The effect applied to the children.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L243)

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

### set_effect

```rust
fn set_effect(self: &Self, value: Option<Rc<dyn IEffect>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L247)

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

### children

```rust
fn children(self: &Self) -> DrawingCollection
```

The collection that contains the child drawings.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L283)

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

### set_children

```rust
fn set_children(self: &Self, value: DrawingCollection)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L287)

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

### open

```rust
fn open(self: &Self) -> DrawingContext<'static>
```

Opens the group for populating: what is drawn on the returned
context replaces the children of the group when the context is
disposed (or dropped).

Panics when no platform render interface is registered.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/drawing_group.rs#L313)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`DrawingImplExt`](/docs/0.5.0/api/ferroui-base/media/trait-drawingimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<DrawingGroup>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`DrawingImpl`](/docs/0.5.0/api/ferroui-base/media/trait-drawingimpl/)

## Availability

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