pub struct Rectangle { /* private fields */ }
Expand description
The Rectangle
structure represents a rectangle.
Rectangle
is frequently used to represent the logical or ink
extents of a single glyph or section of text. (See, for instance,
FontExt::glyph_extents()
.)
GLib type: Inline allocated boxed type with stack copy semantics.
Implementations§
Source§impl Rectangle
impl Rectangle
pub fn as_ptr(&self) -> *mut PangoRectangle
Sourcepub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const PangoRectangle) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>(ptr: *const PangoRectangle) -> &'a Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut PangoRectangle,
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut PangoRectangle, ) -> &'a mut Self
Borrows the underlying C value mutably.
Source§impl Rectangle
impl Rectangle
pub fn new(x: i32, y: i32, width: i32, height: i32) -> Self
pub fn x(&self) -> i32
pub fn set_x(&mut self, x: i32)
pub fn y(&self) -> i32
pub fn set_y(&mut self, y: i32)
pub fn width(&self) -> i32
pub fn set_width(&mut self, width: i32)
pub fn height(&self) -> i32
pub fn set_height(&mut self, height: i32)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rectangle
impl RefUnwindSafe for Rectangle
impl Send for Rectangle
impl Sync for Rectangle
impl Unpin for Rectangle
impl UnwindSafe for Rectangle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)