pub struct CGImage(/* private fields */);
Implementations§
Source§impl CGImage
impl CGImage
pub fn new( width: size_t, height: size_t, bits_per_component: size_t, bits_per_pixel: size_t, bytes_per_row: size_t, space: Option<&CGColorSpace>, bitmap_info: u32, provider: Option<&CGDataProvider>, decode: Option<&[CGFloat]>, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<Self>
pub fn new_mask( width: size_t, height: size_t, bits_per_component: size_t, bits_per_pixel: size_t, bytes_per_row: size_t, provider: Option<&CGDataProvider>, decode: Option<&[CGFloat]>, should_interpolate: bool, ) -> Option<Self>
pub fn from_jpeg_data_provider( provider: &CGDataProvider, decode: Option<&[CGFloat]>, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<Self>
pub fn from_png_data_provider( provider: &CGDataProvider, decode: Option<&[CGFloat]>, should_interpolate: bool, intent: CGColorRenderingIntent, ) -> Option<Self>
pub fn new_copy(&self) -> Option<Self>
pub fn new_copy_with_color_space(&self, space: &CGColorSpace) -> Option<Self>
pub fn new_with_mask(&self, mask: &CGImage) -> Option<Self>
pub fn new_with_masking_colors(&self, components: &[CGFloat]) -> Option<Self>
pub fn cropped(&self, rect: CGRect) -> Option<Self>
pub fn is_mask(&self) -> bool
pub fn width(&self) -> size_t
pub fn height(&self) -> size_t
pub fn bits_per_component(&self) -> size_t
pub fn bits_per_pixel(&self) -> size_t
pub fn bytes_per_row(&self) -> size_t
pub fn color_space(&self) -> Option<CGColorSpace>
pub fn alpha_info(&self) -> CGImageAlphaInfo
pub fn data_provider(&self) -> Option<CGDataProvider>
pub fn should_interpolate(&self) -> bool
pub fn rendering_intent(&self) -> CGColorRenderingIntent
pub fn bitmap_info(&self) -> CGBitmapInfo
pub fn byte_order_info(&self) -> CGImageByteOrderInfo
pub fn pixel_format_info(&self) -> CGImagePixelFormatInfo
pub fn ut_type(&self) -> Option<CFString>
Trait Implementations§
Source§impl TCFType for CGImage
impl TCFType for CGImage
Source§fn as_concrete_TypeRef(&self) -> CGImageRef
fn as_concrete_TypeRef(&self) -> CGImageRef
Returns the object as its concrete
TypeRef
.Source§unsafe fn wrap_under_get_rule(reference: CGImageRef) -> Self
unsafe fn wrap_under_get_rule(reference: CGImageRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Get Rule”. The reference count is bumped.Source§fn as_CFTypeRef(&self) -> CFTypeRef
fn as_CFTypeRef(&self) -> CFTypeRef
Returns the object as a raw
CFTypeRef
. The reference count is not adjusted.Source§unsafe fn wrap_under_create_rule(reference: CGImageRef) -> Self
unsafe fn wrap_under_create_rule(reference: CGImageRef) -> Self
Returns an instance of the object, wrapping the underlying
CFTypeRef
subclass. Use this
when following Core Foundation’s “Create Rule”. The reference count is not bumped.Source§fn as_CFType(&self) -> CFType
fn as_CFType(&self) -> CFType
Returns the object as a wrapped
CFType
. The reference count is incremented by one.Source§fn into_CFType(self) -> CFTypewhere
Self: Sized,
fn into_CFType(self) -> CFTypewhere
Self: Sized,
Returns the object as a wrapped
CFType
. Consumes self and avoids changing the reference
count.Source§fn retain_count(&self) -> isize
fn retain_count(&self) -> isize
Returns the reference count of the object. It is unwise to do anything other than test
whether the return value of this method is greater than zero.
Source§fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
fn instance_of<OtherCFType>(&self) -> boolwhere
OtherCFType: TCFType,
Returns
true
if this value is an instance of another type.impl ConcreteCFType for CGImage
impl Eq for CGImage
Auto Trait Implementations§
impl Freeze for CGImage
impl RefUnwindSafe for CGImage
impl !Send for CGImage
impl !Sync 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