[][src]Struct core_graphics::image::CGImage

pub struct CGImage(_);

Implementations

impl CGImage[src]

pub fn new(
    width: size_t,
    height: size_t,
    bits_per_component: size_t,
    bits_per_pixel: size_t,
    bytes_per_row: size_t,
    colorspace: &CGColorSpace,
    bitmap_info: u32,
    provider: &CGDataProvider,
    should_interpolate: bool,
    rendering_intent: u32
) -> Self
[src]

pub fn type_id() -> CFTypeID[src]

Methods from Deref<Target = CGImageRef>

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 Clone for CGImage[src]

impl Deref for CGImage[src]

type Target = CGImageRef

The resulting type after dereferencing.

impl DerefMut for CGImage[src]

impl Drop for CGImage[src]

Auto Trait Implementations

impl RefUnwindSafe for CGImage

impl !Send for CGImage

impl !Sync for CGImage

impl Unpin for CGImage

impl UnwindSafe for CGImage

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.