pub struct CGColorSpace { /* private fields */ }Available on crate feature
CGColorSpace only.Expand description
Implementations§
Source§impl CGColorSpace
impl CGColorSpace
pub fn new_device_gray() -> Option<CFRetained<CGColorSpace>>
pub fn new_device_rgb() -> Option<CFRetained<CGColorSpace>>
pub fn new_device_cmyk() -> Option<CFRetained<CGColorSpace>>
Sourcepub unsafe fn with_icc_data(
data: Option<&CFType>,
) -> Option<CFRetained<CGColorSpace>>
pub unsafe fn with_icc_data( data: Option<&CFType>, ) -> Option<CFRetained<CGColorSpace>>
§Safety
data should be of the correct type.
Sourcepub unsafe fn new_icc_based(
n_components: usize,
range: *const CGFloat,
profile: Option<&CGDataProvider>,
alternate: Option<&CGColorSpace>,
) -> Option<CFRetained<CGColorSpace>>
Available on crate feature CGDataProvider only.
pub unsafe fn new_icc_based( n_components: usize, range: *const CGFloat, profile: Option<&CGDataProvider>, alternate: Option<&CGColorSpace>, ) -> Option<CFRetained<CGColorSpace>>
CGDataProvider only.§Safety
range must be a valid pointer or null.
Sourcepub unsafe fn new_indexed(
base_space: Option<&CGColorSpace>,
last_index: usize,
color_table: *const c_uchar,
) -> Option<CFRetained<CGColorSpace>>
pub unsafe fn new_indexed( base_space: Option<&CGColorSpace>, last_index: usize, color_table: *const c_uchar, ) -> Option<CFRetained<CGColorSpace>>
§Safety
color_table must be a valid pointer or null.
pub fn new_pattern( base_space: Option<&CGColorSpace>, ) -> Option<CFRetained<CGColorSpace>>
Source§impl CGColorSpace
impl CGColorSpace
pub fn with_name(name: Option<&CFString>) -> Option<CFRetained<CGColorSpace>>
pub fn get_name(space: Option<&CGColorSpace>) -> Option<CFRetained<CFString>>
pub fn name(space: Option<&CGColorSpace>) -> Option<CFRetained<CFString>>
Source§impl CGColorSpace
impl CGColorSpace
pub fn number_of_components(space: Option<&CGColorSpace>) -> usize
pub fn model(space: Option<&CGColorSpace>) -> CGColorSpaceModel
pub fn base_color_space( space: Option<&CGColorSpace>, ) -> Option<CFRetained<CGColorSpace>>
pub fn copy_base_color_space(&self) -> CFRetained<CGColorSpace>
pub fn color_table_count(space: Option<&CGColorSpace>) -> usize
Sourcepub unsafe fn color_table(space: Option<&CGColorSpace>, table: *mut u8)
pub unsafe fn color_table(space: Option<&CGColorSpace>, table: *mut u8)
§Safety
table must be a valid pointer or null.
pub fn icc_data(space: Option<&CGColorSpace>) -> Option<CFRetained<CFData>>
pub fn is_wide_gamut_rgb(&self) -> bool
pub fn is_hdr(&self) -> bool
pub fn uses_itur_2100_tf(&self) -> bool
pub fn is_pq_based(&self) -> bool
pub fn is_hlg_based(&self) -> bool
pub fn supports_output(&self) -> bool
pub fn property_list(&self) -> Option<CFRetained<CFPropertyList>>
Sourcepub unsafe fn with_property_list(
plist: &CFPropertyList,
) -> Option<CFRetained<CGColorSpace>>
pub unsafe fn with_property_list( plist: &CFPropertyList, ) -> Option<CFRetained<CGColorSpace>>
§Safety
plist should be of the correct type.
pub fn uses_extended_range(&self) -> bool
pub fn linearized(&self) -> Option<CFRetained<CGColorSpace>>
pub fn extended(&self) -> Option<CFRetained<CGColorSpace>>
pub fn extended_linearized(&self) -> Option<CFRetained<CGColorSpace>>
pub fn copy_with_standard_range(&self) -> CFRetained<CGColorSpace>
pub fn with_icc_profile( data: Option<&CFData>, ) -> Option<CFRetained<CGColorSpace>>
👎Deprecated: No longer supported
pub fn icc_profile(space: Option<&CGColorSpace>) -> Option<CFRetained<CFData>>
👎Deprecated: No longer supported
Sourcepub unsafe fn with_platform_color_space(
ref: *const c_void,
) -> Option<CFRetained<CGColorSpace>>
👎Deprecated: No longer supported
pub unsafe fn with_platform_color_space( ref: *const c_void, ) -> Option<CFRetained<CGColorSpace>>
§Safety
ref must be a valid pointer or null.
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 AsRef<AnyObject> for CGColorSpace
impl AsRef<AnyObject> for CGColorSpace
Source§impl AsRef<CFType> for CGColorSpace
impl AsRef<CFType> for CGColorSpace
Source§impl AsRef<CGColorSpace> for CGColorSpace
impl AsRef<CGColorSpace> for CGColorSpace
Source§impl Borrow<AnyObject> for CGColorSpace
impl Borrow<AnyObject> for CGColorSpace
Source§impl Borrow<CFType> for CGColorSpace
impl Borrow<CFType> for CGColorSpace
Source§impl ConcreteType for CGColorSpace
impl ConcreteType for CGColorSpace
Source§impl Debug for CGColorSpace
impl Debug for CGColorSpace
Source§impl Deref for CGColorSpace
impl Deref for CGColorSpace
Source§impl Hash for CGColorSpace
impl Hash for CGColorSpace
Source§impl Message for CGColorSpace
impl Message for CGColorSpace
Source§impl PartialEq for CGColorSpace
impl PartialEq for CGColorSpace
Source§impl RefEncode for CGColorSpace
impl RefEncode for CGColorSpace
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 CGColorSpace
impl Type for CGColorSpace
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 CGColorSpace
impl Send for CGColorSpace
impl Sync for CGColorSpace
Auto Trait Implementations§
impl !Freeze for CGColorSpace
impl !RefUnwindSafe for CGColorSpace
impl !Unpin for CGColorSpace
impl !UnwindSafe for CGColorSpace
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