pub struct CGImage { /* private fields */ }CGImage only.Expand description
Implementations§
Source§impl CGImage
impl CGImage
Sourcepub 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 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>>
CGColorSpace and CGDataProvider only.§Safety
decode must be a valid pointer or null.
Sourcepub 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 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>>
CGDataProvider only.§Safety
decode must be a valid pointer or null.
pub fn new_copy(image: Option<&CGImage>) -> Option<CFRetained<CGImage>>
Sourcepub 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_jpeg_data_provider( source: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<CFRetained<CGImage>>
CGColorSpace and CGDataProvider only.§Safety
decode must be a valid pointer or null.
Sourcepub 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_png_data_provider( source: Option<&CGDataProvider>, decode: *const CGFloat, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<CFRetained<CGImage>>
CGColorSpace and CGDataProvider only.§Safety
decode must be a valid pointer or null.
pub fn with_image_in_rect( image: Option<&CGImage>, rect: CGRect, ) -> Option<CFRetained<CGImage>>
pub fn with_mask( image: Option<&CGImage>, mask: Option<&CGImage>, ) -> Option<CFRetained<CGImage>>
Sourcepub unsafe fn with_masking_colors(
image: Option<&CGImage>,
components: *const CGFloat,
) -> Option<CFRetained<CGImage>>
pub unsafe fn with_masking_colors( image: Option<&CGImage>, components: *const CGFloat, ) -> Option<CFRetained<CGImage>>
§Safety
components must be a valid pointer or null.
pub fn new_copy_with_color_space( image: Option<&CGImage>, space: Option<&CGColorSpace>, ) -> Option<CFRetained<CGImage>>
CGColorSpace only.Sourcepub 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 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>>
CGColorSpace and CGDataProvider only.§Safety
decode must be a valid pointer or null.
pub fn new_copy_with_content_headroom( headroom: c_float, image: Option<&CGImage>, ) -> Option<CFRetained<CGImage>>
Source§impl CGImage
impl CGImage
pub fn content_headroom(image: Option<&CGImage>) -> c_float
pub fn calculate_content_headroom(image: Option<&CGImage>) -> c_float
pub fn content_average_light_level(image: Option<&CGImage>) -> c_float
pub fn calculate_content_average_light_level(image: Option<&CGImage>) -> c_float
pub fn new_copy_with_content_average_light_level( image: Option<&CGImage>, avll: c_float, ) -> Option<CFRetained<CGImage>>
pub fn new_copy_with_calculated_hdr_stats( image: Option<&CGImage>, ) -> Option<CFRetained<CGImage>>
pub fn is_mask(image: Option<&CGImage>) -> bool
pub fn width(image: Option<&CGImage>) -> usize
pub fn height(image: Option<&CGImage>) -> usize
pub fn bits_per_component(image: Option<&CGImage>) -> usize
pub fn bits_per_pixel(image: Option<&CGImage>) -> usize
pub fn bytes_per_row(image: Option<&CGImage>) -> usize
pub fn color_space(image: Option<&CGImage>) -> Option<CFRetained<CGColorSpace>>
CGColorSpace only.pub fn alpha_info(image: Option<&CGImage>) -> CGImageAlphaInfo
pub fn data_provider( image: Option<&CGImage>, ) -> Option<CFRetained<CGDataProvider>>
CGDataProvider only.pub fn decode(image: Option<&CGImage>) -> *const CGFloat
pub fn should_interpolate(image: Option<&CGImage>) -> bool
pub fn rendering_intent(image: Option<&CGImage>) -> CGColorRenderingIntent
CGColorSpace only.pub fn bitmap_info(image: Option<&CGImage>) -> CGBitmapInfo
pub fn byte_order_info(image: Option<&CGImage>) -> CGImageByteOrderInfo
pub fn pixel_format_info(image: Option<&CGImage>) -> CGImagePixelFormatInfo
pub fn should_tone_map(image: Option<&CGImage>) -> bool
pub fn contains_image_specific_tone_mapping_metadata( image: Option<&CGImage>, ) -> bool
pub 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 CFNumbers, small CFStrings 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
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,
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
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,
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
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,
core-foundation crate. Read more