[−][src]Struct core_graphics::image::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]
fn as_ref(&self) -> &CGImageRef
[src]
impl Borrow<CGImageRef> for CGImage
[src]
fn borrow(&self) -> &CGImageRef
[src]
impl ToOwned for CGImageRef
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CGImageRef
impl Send for CGImageRef
impl !Sync for CGImageRef
impl Unpin for CGImageRef
impl UnwindSafe for CGImageRef
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,