# VncRectangle

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-headless-vnc/remote_viewing/vnc/struct-vncrectangle/

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

```rust
struct VncRectangle
```

Bounds the changed pixels of a framebuffer.

The fields are the settable properties of the original.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L10)

## Members

- [`x`](#struct_field-x)
- [`y`](#struct_field-y)
- [`width`](#struct_field-width)
- [`height`](#struct_field-height)
- [`new`](#function-new)
- [`area`](#function-area)
- [`is_empty`](#function-is_empty)
- [`intersect`](#function-intersect)
- [`union`](#function-union)

<a id="struct_field-x"></a>

### x

```rust
x: i32
```

The X coordinate of the leftmost changed pixel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L12)

<a id="struct_field-y"></a>

### y

```rust
y: i32
```

The Y coordinate of the topmost changed pixel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L14)

<a id="struct_field-width"></a>

### width

```rust
width: i32
```

The width of the changed region.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L16)

<a id="struct_field-height"></a>

### height

```rust
height: i32
```

The height of the changed region.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L18)

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

### new

```rust
fn new(x: i32, y: i32, width: i32, height: i32) -> Self
```

Initializes a new instance of the `VncRectangle` structure.
## Panics
When a value is negative (`ArgumentOutOfRangeException`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L26)

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

### area

```rust
fn area(self: &Self) -> i32
```

Gets the number of pixels.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L53)

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

### is_empty

```rust
fn is_empty(self: &Self) -> bool
```

Gets a value indicating whether the region is empty: true if the
region contains no pixels.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L59)

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

### intersect

```rust
fn intersect(rect1: VncRectangle, rect2: VncRectangle) -> VncRectangle
```

Intersects two rectangles.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L64)

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

### union

```rust
fn union(rect1: VncRectangle, rect2: VncRectangle) -> VncRectangle
```

Finds a region that contains both rectangles.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/vnc_rectangle.rs#L83)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `ToString`
- [`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/)
- `Same`
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- `Display`
- `ErasedDestructor`
- `IntoEither`

## Availability

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