# IDrawingContextCore

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/trait-idrawingcontextcore/

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

```rust
trait IDrawingContextCore
```

The overridable part of a drawing context: the `*Core` members.

Implemented by the platform drawing context and by the recording
context. The arguments have been validated by [`DrawingContext`](/docs/0.5.0/api/ferroui-base/media/struct-drawingcontext/).

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

## Members

- [`draw_line_core`](#function-draw_line_core)
- [`draw_geometry_core`](#function-draw_geometry_core)
- [`draw_rectangle_core`](#function-draw_rectangle_core)
- [`draw_ellipse_core`](#function-draw_ellipse_core)
- [`custom`](#function-custom)
- [`draw_glyph_run`](#function-draw_glyph_run)
- [`draw_rectangle_acrylic_core`](#function-draw_rectangle_acrylic_core)
- [`push_clip_core`](#function-push_clip_core)
- [`push_rounded_clip_core`](#function-push_rounded_clip_core)
- [`push_geometry_clip_core`](#function-push_geometry_clip_core)
- [`push_opacity_core`](#function-push_opacity_core)
- [`push_opacity_mask_core`](#function-push_opacity_mask_core)
- [`push_transform_core`](#function-push_transform_core)
- [`push_render_options_core`](#function-push_render_options_core)
- [`push_text_options_core`](#function-push_text_options_core)
- [`push_effect_core`](#function-push_effect_core)
- [`try_push_compositing_layer_core`](#function-try_push_compositing_layer_core)
- [`pop_compositing_layer_core`](#function-pop_compositing_layer_core)
- [`pop_clip_core`](#function-pop_clip_core)
- [`pop_geometry_clip_core`](#function-pop_geometry_clip_core)
- [`pop_opacity_core`](#function-pop_opacity_core)
- [`pop_opacity_mask_core`](#function-pop_opacity_mask_core)
- [`pop_transform_core`](#function-pop_transform_core)
- [`pop_render_options_core`](#function-pop_render_options_core)
- [`pop_text_options_core`](#function-pop_text_options_core)
- [`pop_effect_core`](#function-pop_effect_core)
- [`dispose_core`](#function-dispose_core)

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

### draw_line_core

```rust
fn draw_line_core(self: &mut Self, pen: &Rc<dyn IPen>, p1: Point, p2: Point)
```

Draws a line. The pen is visible.

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

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

### draw_geometry_core

```rust
fn draw_geometry_core(self: &mut Self, brush: Option<&Rc<dyn IBrush>>, pen: Option<&Rc<dyn IPen>>, geometry: &Ref<Geometry>)
```

Draws a geometry object. The default implementation draws its
platform implementation, if it has one.

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

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

### draw_rectangle_core

```rust
fn draw_rectangle_core(self: &mut Self, brush: Option<&Rc<dyn IBrush>>, pen: Option<&Rc<dyn IPen>>, rrect: RoundedRect, box_shadows: &BoxShadows)
```

Draws a rectangle with the specified brush and pen.

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

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

### draw_ellipse_core

```rust
fn draw_ellipse_core(self: &mut Self, brush: Option<&Rc<dyn IBrush>>, pen: Option<&Rc<dyn IPen>>, rect: Rect)
```

Draws an ellipse with the specified brush and pen.

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

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

### custom

```rust
fn custom(self: &mut Self, custom: &std::sync::Arc<dyn ICustomDrawOperation>)
```

Draws a custom drawing operation.

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

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

### draw_glyph_run

```rust
fn draw_glyph_run(self: &mut Self, foreground: Option<&Rc<dyn IBrush>>, glyph_run: &Rc<GlyphRun>)
```

Draws a glyph run.

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

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

### draw_rectangle_acrylic_core

```rust
fn draw_rectangle_acrylic_core(self: &mut Self, material: &dyn IExperimentalAcrylicMaterial, rect: RoundedRect)
```

Draws a rectangle filled with an acrylic-like material.

Upstream only the platform drawing context has this member and
callers cast the context to reach it. Here it is a core member so
that it is reachable through `DrawingContext`: the platform core
uses the backend's acrylic support, every other core gets the
rectangle filled with the fallback color of the material.

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

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

### push_clip_core

```rust
fn push_clip_core(self: &mut Self, rect: Rect)
```



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

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

### push_rounded_clip_core

```rust
fn push_rounded_clip_core(self: &mut Self, rect: RoundedRect)
```



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

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

### push_geometry_clip_core

```rust
fn push_geometry_clip_core(self: &mut Self, clip: &Ref<Geometry>)
```



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

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

### push_opacity_core

```rust
fn push_opacity_core(self: &mut Self, opacity: f64)
```



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

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

### push_opacity_mask_core

```rust
fn push_opacity_mask_core(self: &mut Self, mask: &Rc<dyn IBrush>, bounds: Rect)
```



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

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

### push_transform_core

```rust
fn push_transform_core(self: &mut Self, matrix: Matrix)
```



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

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

### push_render_options_core

```rust
fn push_render_options_core(self: &mut Self, render_options: RenderOptions)
```



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

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

### push_text_options_core

```rust
fn push_text_options_core(self: &mut Self, text_options: TextOptions)
```



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

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

### push_effect_core

```rust
fn push_effect_core(self: &mut Self, effect: &Rc<dyn IEffect>, bounds: Rect)
```



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

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

### try_push_compositing_layer_core

```rust
fn try_push_compositing_layer_core(self: &mut Self, _blend: BitmapBlendingMode, _opacity: f64, _bounds: Rect) -> bool
```

Optional isolated compositing support. False leaves the core unchanged.

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

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

### pop_compositing_layer_core

```rust
fn pop_compositing_layer_core(self: &mut Self)
```



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

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

### pop_clip_core

```rust
fn pop_clip_core(self: &mut Self)
```



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

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

### pop_geometry_clip_core

```rust
fn pop_geometry_clip_core(self: &mut Self)
```



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

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

### pop_opacity_core

```rust
fn pop_opacity_core(self: &mut Self)
```



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

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

### pop_opacity_mask_core

```rust
fn pop_opacity_mask_core(self: &mut Self)
```



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

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

### pop_transform_core

```rust
fn pop_transform_core(self: &mut Self)
```



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

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

### pop_render_options_core

```rust
fn pop_render_options_core(self: &mut Self)
```



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

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

### pop_text_options_core

```rust
fn pop_text_options_core(self: &mut Self)
```



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

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

### pop_effect_core

```rust
fn pop_effect_core(self: &mut Self)
```



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

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

### dispose_core

```rust
fn dispose_core(self: &mut Self)
```

Releases the core. Called once, after every pushed state has been
popped, when an owned context is disposed.

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

## Trait implementations

- [`IDrawingContextCore`](/docs/0.5.0/api/ferroui-base/media/trait-idrawingcontextcore/)

## Availability

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