oa::ui::types::PixelRect

Axis-aligned pixel rectangle in physical screen coordinates.

StRust public API

Declaration

pub struct PixelRect { pub x: i32, pub y: i32, pub w: u32, pub h: u32, }
Public Rust declaration.

Public Methods

pub const fn is_non_empty(&self) -> bool
pub fn contains(&self, px: f32, py: f32) -> bool
pub fn clip(&self, child: &PixelRect) -> PixelRect
fn clone(&self) -> PixelRect
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn eq(&self, other: &PixelRect) -> bool

Associated Functions

pub const fn new(x: i32, y: i32, w: u32, h: u32) -> Self
fn default() -> PixelRect

Public Data Members

xi32field
yi32field
wu32field
hu32field

Public Method Documentation

pub const fn is_non_empty( &self ) -> bool
No public source comment is attached to this declaration.
pub fn contains( &self, px: f32, py: f32 ) -> bool
No public source comment is attached to this declaration.
pub fn clip( &self, child: &PixelRect ) -> PixelRect
No public source comment is attached to this declaration.
fn clone( &self ) -> PixelRect
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn eq( &self, other: &PixelRect ) -> bool
No public source comment is attached to this declaration.
pub const fn new( x: i32, y: i32, w: u32, h: u32 ) -> Self
True when the rectangle has non-zero area.
fn default() -> PixelRect
No public source comment is attached to this declaration.