pub struct RoundedRect { /* private fields */ }
Expand description
GLib type: Inline allocated boxed type with stack copy semantics.
Implementations§
Source§impl RoundedRect
impl RoundedRect
pub fn as_ptr(&self) -> *mut GskRoundedRect
Sourcepub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const GskRoundedRect) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const GskRoundedRect) -> &'a Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut GskRoundedRect,
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut GskRoundedRect, ) -> &'a mut Self
Borrows the underlying C value mutably.
Source§impl RoundedRect
impl RoundedRect
pub fn new( bounds: Rect, top_left: Size, top_right: Size, bottom_right: Size, bottom_left: Size, ) -> Self
pub fn from_rect(bounds: Rect, radius: f32) -> Self
pub fn normalize(&mut self)
pub fn offset(&mut self, dx: f32, dy: f32)
pub fn shrink(&mut self, top: f32, right: f32, bottom: f32, left: f32)
pub fn is_rectilinear(&self) -> bool
pub fn contains_point(&self, point: Point) -> bool
pub fn contains_rect(&self, rect: Rect) -> bool
pub fn intersects_rect(&self, rect: Rect) -> bool
pub fn bounds(&self) -> &Rect
pub fn corner(&self) -> &[Size; 4]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RoundedRect
impl RefUnwindSafe for RoundedRect
impl Send for RoundedRect
impl Sync for RoundedRect
impl Unpin for RoundedRect
impl UnwindSafe for RoundedRect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more