pub struct MasteringDisplay { /* private fields */ }Expand description
HDR10 mastering display metadata.
Implementations§
Source§impl MasteringDisplay
impl MasteringDisplay
Sourcepub const fn new(
display_primaries: [(u32, u32); 3],
white_point: (u32, u32),
max_luminance: (u32, u32),
min_luminance: (u32, u32),
) -> Self
pub const fn new( display_primaries: [(u32, u32); 3], white_point: (u32, u32), max_luminance: (u32, u32), min_luminance: (u32, u32), ) -> Self
Constructs a MasteringDisplay.
Sourcepub const fn display_primaries(&self) -> [(u32, u32); 3]
pub const fn display_primaries(&self) -> [(u32, u32); 3]
Display primary chromaticities (x, y) for R, G, B in CIE 1931
(each as (num, den) rational, with den non-zero).
Sourcepub const fn white_point(&self) -> (u32, u32)
pub const fn white_point(&self) -> (u32, u32)
White-point chromaticity (x, y) as rationals.
Sourcepub const fn max_luminance(&self) -> (u32, u32)
pub const fn max_luminance(&self) -> (u32, u32)
Maximum luminance in 0.0001 cd/m² units (rational (num, den)).
Sourcepub const fn min_luminance(&self) -> (u32, u32)
pub const fn min_luminance(&self) -> (u32, u32)
Minimum luminance in 0.0001 cd/m² units.
Sourcepub const fn with_display_primaries(self, value: [(u32, u32); 3]) -> Self
pub const fn with_display_primaries(self, value: [(u32, u32); 3]) -> Self
Sets the display primaries (consuming builder).
Sourcepub const fn with_white_point(self, value: (u32, u32)) -> Self
pub const fn with_white_point(self, value: (u32, u32)) -> Self
Sets the white point (consuming builder).
Sourcepub const fn with_max_luminance(self, value: (u32, u32)) -> Self
pub const fn with_max_luminance(self, value: (u32, u32)) -> Self
Sets the max luminance (consuming builder).
Sourcepub const fn with_min_luminance(self, value: (u32, u32)) -> Self
pub const fn with_min_luminance(self, value: (u32, u32)) -> Self
Sets the min luminance (consuming builder).
Sourcepub const fn set_display_primaries(
&mut self,
value: [(u32, u32); 3],
) -> &mut Self
pub const fn set_display_primaries( &mut self, value: [(u32, u32); 3], ) -> &mut Self
Sets the display primaries in place.
Sourcepub const fn set_white_point(&mut self, value: (u32, u32)) -> &mut Self
pub const fn set_white_point(&mut self, value: (u32, u32)) -> &mut Self
Sets the white point in place.
Sourcepub const fn set_max_luminance(&mut self, value: (u32, u32)) -> &mut Self
pub const fn set_max_luminance(&mut self, value: (u32, u32)) -> &mut Self
Sets the max luminance in place.
Sourcepub const fn set_min_luminance(&mut self, value: (u32, u32)) -> &mut Self
pub const fn set_min_luminance(&mut self, value: (u32, u32)) -> &mut Self
Sets the min luminance in place.
Trait Implementations§
Source§impl Clone for MasteringDisplay
impl Clone for MasteringDisplay
Source§fn clone(&self) -> MasteringDisplay
fn clone(&self) -> MasteringDisplay
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MasteringDisplay
impl Debug for MasteringDisplay
Source§impl PartialEq for MasteringDisplay
impl PartialEq for MasteringDisplay
Source§fn eq(&self, other: &MasteringDisplay) -> bool
fn eq(&self, other: &MasteringDisplay) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MasteringDisplay
impl StructuralPartialEq for MasteringDisplay
Auto Trait Implementations§
impl Freeze for MasteringDisplay
impl RefUnwindSafe for MasteringDisplay
impl Send for MasteringDisplay
impl Sync for MasteringDisplay
impl Unpin for MasteringDisplay
impl UnsafeUnpin for MasteringDisplay
impl UnwindSafe for MasteringDisplay
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