Struct babl::Space

source ·
pub struct Space(/* private fields */);

Implementations§

source§

impl Space

source

pub fn from_name(name: &str) -> Self

source

pub fn from_icc(icc_data: Vec<u8>, intent: IccIntent) -> Result<Self, Error>

source

pub fn from_chromaticities( name: &str, wx: f64, wy: f64, rx: f64, ry: f64, gx: f64, gy: f64, bx: f64, by: f64, trc_red: &Trc, trc_green: &Trc, trc_blue: &Trc, flags: SpaceFlags ) -> Self

source

pub fn from_rgbxyz_matrix( name: &str, wx: f64, wy: f64, wz: f64, rx: f64, gx: f64, bx: f64, ry: f64, gy: f64, by: f64, rz: f64, gz: f64, bz: f64, trc_red: &Trc, trc_green: &Trc, trc_blue: &Trc ) -> Self

source

pub fn with_trc(self, trc: &Trc) -> Self

source

pub fn gamma(&self) -> f64

source

pub fn rgb_luminance(&self) -> (f64, f64, f64)

source

pub fn is_cmyk(&self) -> bool

source

pub fn is_gray(&self) -> bool

source

pub fn get( &self, xw: &mut f64, yw: &mut f64, xr: &mut f64, yr: &mut f64, xg: &mut f64, yg: &mut f64, xb: &mut f64, yb: &mut f64, red_trc: &mut Trc, green_trc: &mut Trc, blue_trc: &mut Trc )

Trait Implementations§

source§

impl Debug for Space

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ObjectType for Space

source§

unsafe fn from_raw_full(ptr: *const Babl) -> Self

source§

unsafe fn inner(&self) -> *const Babl

source§

fn name(&self) -> String

source§

fn introspect(&self)

Auto Trait Implementations§

§

impl Freeze for Space

§

impl RefUnwindSafe for Space

§

impl !Send for Space

§

impl !Sync for Space

§

impl Unpin for Space

§

impl UnwindSafe for Space

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.