# DragVisualGhost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-designer/struct-dragvisualghost/

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

```rust
struct DragVisualGhost
```

A native drag snapshot. Capture after the move threshold and drop it when the
gesture finishes or cancels; no accepted control property is changed.

Ancestor affine transforms are preserved. A source's own render transform or
mirror is currently declined because the native bitmap renderer applies it
inside its local clipping rectangle. Those controls use the geometric ghost.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/layout_helper_ghost.rs#L13)

## Members

- [`capture`](#function-capture)
- [`pixel_count`](#function-pixel_count)
- [`render`](#function-render)

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

### capture

```rust
fn capture(visual: &Ref<Visual>, to_artboard: Matrix, raster_scale: f64) -> Option<Self>
```

Capture a laid-out control once. The longest bitmap edge is bounded to
2048 pixels, retaining aspect ratio. Hosts should also bound the sum of
`pixel_count()` across a large multiselection.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/layout_helper_ghost.rs#L23)

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

### pixel_count

```rust
fn pixel_count(self: &Self) -> usize
```

Number of cached RGBA pixels, for a host-owned aggregate gesture budget.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/layout_helper_ghost.rs#L62)

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

### render

```rust
fn render(self: &Self, context: &mut DrawingContext<'_>, adjustment: Matrix, opacity: f64)
```

Render with an artboard-space adjustment, such as the current translation.
The cached content does not refresh or mutate runtime/source while dragging.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Designer/layout_helper_ghost.rs#L68)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Same`
- `Drop`

## Availability

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