pub struct CGColorSpace { /* private fields */ }Available on crate feature
cg only.Expand description
Reference-counted CGColorSpaceRef.
Implementations§
Source§impl CGColorSpace
impl CGColorSpace
Sourcepub const unsafe fn from_raw(ptr: *mut c_void) -> Self
pub const unsafe fn from_raw(ptr: *mut c_void) -> Self
Wrap a raw CGColorSpaceRef pointer — takes ownership without retaining.
§Safety
ptr must be a non-null CGColorSpaceRef whose ownership the caller is
transferring to the returned CGColorSpace.
Sourcepub fn device_rgb() -> Self
pub fn device_rgb() -> Self
Device RGB.
Sourcepub fn device_gray() -> Self
pub fn device_gray() -> Self
Device gray.
Sourcepub fn display_p3() -> Self
pub fn display_p3() -> Self
Display P3.
Sourcepub fn number_of_components(&self) -> usize
pub fn number_of_components(&self) -> usize
Number of color components (3 for RGB, 1 for gray, …).
Trait Implementations§
Source§impl Clone for CGColorSpace
impl Clone for CGColorSpace
Source§impl Debug for CGColorSpace
impl Debug for CGColorSpace
Source§impl Drop for CGColorSpace
impl Drop 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 UnsafeUnpin 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