VncRectangle
struct · ferroui-headless-vnc · v0.5.0
struct VncRectangle
Bounds the changed pixels of a framebuffer.
The fields are the settable properties of the original.
Members
x
x: i32
The X coordinate of the leftmost changed pixel.
y
y: i32
The Y coordinate of the topmost changed pixel.
width
width: i32
The width of the changed region.
height
height: i32
The height of the changed region.
new
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).
area
fn area(self: &Self) -> i32
Gets the number of pixels.
is_empty
fn is_empty(self: &Self) -> bool
Gets a value indicating whether the region is empty: true if the region contains no pixels.
intersect
fn intersect(rect1: VncRectangle, rect2: VncRectangle) -> VncRectangle
Intersects two rectangles.
union
fn union(rect1: VncRectangle, rect2: VncRectangle) -> VncRectangle
Finds a region that contains both rectangles.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringResourceKeyObjectPropertyValueAnyValueClassDefaultsSameCloneCopyDebugDefaultStructuralPartialEqPartialEqEqHashDisplayErasedDestructorIntoEither
Availability
Extracted for x86_64-unknown-linux-gnu, aarch64-apple-darwin. Cargo features are listed in the crate index.