#[repr(C)]pub struct CGImage { /* private fields */ }
Available on crate feature
CGImage
only.Expand description
Implementations§
Source§impl CGImage
impl CGImage
pub unsafe fn new( width: usize, height: usize, bits_per_component: usize, bits_per_pixel: usize, bytes_per_row: usize, space: Option<&CGColorSpace>, bitmap_info: CGBitmapInfo, provider: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<CFRetained<CGImage>>
Available on crate features
CGColorSpace
and CGDataProvider
only.pub unsafe fn mask_create( width: usize, height: usize, bits_per_component: usize, bits_per_pixel: usize, bytes_per_row: usize, provider: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, ) -> Option<CFRetained<CGImage>>
Available on crate feature
CGDataProvider
only.pub unsafe fn new_copy(image: Option<&CGImage>) -> Option<CFRetained<CGImage>>
pub unsafe fn with_jpeg_data_provider( source: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<CFRetained<CGImage>>
Available on crate features
CGColorSpace
and CGDataProvider
only.pub unsafe fn with_png_data_provider( source: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<CFRetained<CGImage>>
Available on crate features
CGColorSpace
and CGDataProvider
only.pub unsafe fn with_image_in_rect( image: Option<&CGImage>, rect: CGRect, ) -> Option<CFRetained<CGImage>>
pub unsafe fn with_mask( image: Option<&CGImage>, mask: Option<&CGImage>, ) -> Option<CFRetained<CGImage>>
pub unsafe fn with_masking_colors( image: Option<&CGImage>, components: *const CGFloat, ) -> Option<CFRetained<CGImage>>
pub unsafe fn new_copy_with_color_space( image: Option<&CGImage>, space: Option<&CGColorSpace>, ) -> Option<CFRetained<CGImage>>
Available on crate feature
CGColorSpace
only.pub unsafe fn with_content_headroom( headroom: c_float, width: usize, height: usize, bits_per_component: usize, bits_per_pixel: usize, bytes_per_row: usize, space: Option<&CGColorSpace>, bitmap_info: CGBitmapInfo, provider: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<CFRetained<CGImage>>
Available on crate features
CGColorSpace
and CGDataProvider
only.pub unsafe fn new_copy_with_content_headroom( headroom: c_float, image: Option<&CGImage>, ) -> Option<CFRetained<CGImage>>
Source§impl CGImage
impl CGImage
pub unsafe fn content_headroom(image: Option<&CGImage>) -> c_float
pub unsafe fn is_mask(image: Option<&CGImage>) -> bool
pub unsafe fn width(image: Option<&CGImage>) -> usize
pub unsafe fn height(image: Option<&CGImage>) -> usize
pub unsafe fn bits_per_component(image: Option<&CGImage>) -> usize
pub unsafe fn bits_per_pixel(image: Option<&CGImage>) -> usize
pub unsafe fn bytes_per_row(image: Option<&CGImage>) -> usize
pub unsafe fn color_space( image: Option<&CGImage>, ) -> Option<CFRetained<CGColorSpace>>
Available on crate feature
CGColorSpace
only.pub unsafe fn alpha_info(image: Option<&CGImage>) -> CGImageAlphaInfo
pub unsafe fn data_provider( image: Option<&CGImage>, ) -> Option<CFRetained<CGDataProvider>>
Available on crate feature
CGDataProvider
only.pub unsafe fn decode(image: Option<&CGImage>) -> *const CGFloat
pub unsafe fn should_interpolate(image: Option<&CGImage>) -> bool
pub unsafe fn rendering_intent( image: Option<&CGImage>, ) -> CGColorRenderingIntent
Available on crate feature
CGColorSpace
only.pub unsafe fn bitmap_info(image: Option<&CGImage>) -> CGBitmapInfo
pub unsafe fn byte_order_info(image: Option<&CGImage>) -> CGImageByteOrderInfo
pub unsafe fn pixel_format_info( image: Option<&CGImage>, ) -> CGImagePixelFormatInfo
pub unsafe fn should_tone_map(image: Option<&CGImage>) -> bool
pub unsafe fn contains_image_specific_tone_mapping_metadata( image: Option<&CGImage>, ) -> bool
pub unsafe fn ut_type(image: Option<&CGImage>) -> Option<CFRetained<CFString>>
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T
.
This is the reference-variant. Use CFRetained::downcast
if you
want to convert a retained type. See also ConcreteType
for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumber
s, small CFString
s etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX
in that case.
Trait Implementations§
Source§impl ConcreteType for CGImage
impl ConcreteType for CGImage
Source§impl RefEncode for CGImage
impl RefEncode for CGImage
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl Type for CGImage
impl Type for CGImage
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation
crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
core-foundation
crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation
crate. Read moreimpl Eq for CGImage
impl Send for CGImage
impl Sync for CGImage
Auto Trait Implementations§
impl !Freeze for CGImage
impl !RefUnwindSafe for CGImage
impl !Unpin for CGImage
impl !UnwindSafe for CGImage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more