Struct core_graphics2::geometry::CGRect
source · #[repr(C)]pub struct CGRect {
pub origin: CGPoint,
pub size: CGSize,
}Fields§
§origin: CGPoint§size: CGSizeImplementations§
source§impl CGRect
impl CGRect
pub fn new(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat) -> CGRect
pub fn from_dict_representation(dict: &CFDictionary) -> Option<Self>
pub fn min(&self) -> (CGFloat, CGFloat)
pub fn mid(&self) -> (CGFloat, CGFloat)
pub fn max(&self) -> (CGFloat, CGFloat)
pub fn width(&self) -> CGFloat
pub fn height(&self) -> CGFloat
pub fn standardize(&self) -> CGRect
pub fn is_empty(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_infinite(&self) -> bool
pub fn inset(&self, dx: CGFloat, dy: CGFloat) -> CGRect
pub fn integral(&self) -> CGRect
pub fn union(&self, rect: &CGRect) -> CGRect
pub fn intersection(&self, rect: &CGRect) -> CGRect
pub fn offset(&self, dx: CGFloat, dy: CGFloat) -> CGRect
pub fn divide( &self, slice: &mut CGRect, remainder: &mut CGRect, amount: CGFloat, edge: CGRectEdge )
pub fn contains_point(&self, point: &CGPoint) -> bool
pub fn contains_rect(&self, rect: &CGRect) -> bool
pub fn intersects_rect(&self, rect: &CGRect) -> bool
pub fn apply_transform(&self, transform: &CGAffineTransform) -> CGRect
Trait Implementations§
source§impl PartialEq for CGRect
impl PartialEq for CGRect
impl Copy for CGRect
impl StructuralPartialEq for CGRect
Auto Trait Implementations§
impl Freeze for CGRect
impl RefUnwindSafe for CGRect
impl Send for CGRect
impl Sync for CGRect
impl Unpin for CGRect
impl UnwindSafe for CGRect
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