[][src]Struct core_graphics::image::CGImageRef

pub struct CGImageRef(_);

Implementations

impl CGImageRef[src]

pub fn width(&self) -> size_t[src]

pub fn height(&self) -> size_t[src]

pub fn bits_per_component(&self) -> size_t[src]

pub fn bits_per_pixel(&self) -> size_t[src]

pub fn bytes_per_row(&self) -> size_t[src]

pub fn color_space(&self) -> CGColorSpace[src]

pub fn data(&self) -> CFData[src]

Returns the raw image bytes wrapped in CFData. Note, the returned CFData owns the underlying buffer.

pub fn cropped(&self, rect: CGRect) -> Option<CGImage>[src]

Returns a cropped image. If the rect specifies a rectangle which lies outside of the image bounds, the None is returned.

Trait Implementations

impl AsRef<CGImageRef> for CGImage[src]

impl Borrow<CGImageRef> for CGImage[src]

impl ToOwned for CGImageRef[src]

type Owned = CGImage

The resulting type after obtaining ownership.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.