pub fn cropped(&self, rect: CGRect) -> Option<CGImage> {
        let image_ptr = unsafe { CGImageCreateWithImageInRect(self.as_ptr(), rect) };
        if !image_ptr.is_null() {
            Some(unsafe { CGImage::from_ptr(image_ptr) })
        } else {
            None
        }
    }
/// Returns a cropped image. If the `rect` specifies a rectangle which lies outside of the
/// image bounds, the `None` is returned.
Returns a cropped image. If the `rect` specifies a rectangle which lies outside of the
image bounds, the `None` is returned.
Returns a cropped image . If the ` rect ` specifies a rectangle which lies outside of the image bounds the ` None ` is returned .
pub fn cropped(&self, rect: CGRect) -> Option<CGImage> {
        let image_ptr = unsafe { CGImageCreateWithImageInRect(self.as_ptr(), rect) };
        if !image_ptr.is_null() {
            Some(unsafe { CGImage::from_ptr(image_ptr) })
        } else {
            None
        }
    }
pub fn cropped ( & self , rect : CGRect ) -> Option < CGImage > { let image_ptr = unsafe { CGImageCreateWithImageInRect ( self . as_ptr ( ) , rect ) } ; if ! image_ptr . is_null ( ) { Some ( unsafe { CGImage :: from_ptr ( image_ptr ) } ) } else { None } }
Returns a cropped image.
Returns a cropped image .
&self
rect
CGRect