[−][src]Struct core_graphics::image::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]
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
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]
fn as_ref(&self) -> &CGImageRef
[src]
impl Borrow<CGImageRef> for CGImage
[src]
fn borrow(&self) -> &CGImageRef
[src]
impl Clone for CGImage
[src]
impl Deref for CGImage
[src]
impl DerefMut for CGImage
[src]
fn deref_mut(&mut self) -> &mut CGImageRef
[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]
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>,