pub struct TextLuminance(/* private fields */);Expand description
The luminance class a glyph mask is corrected for. Text colors whose luminance falls in the same eighth share a correction, so a glyph cached for one of them serves them all.
Implementations§
Source§impl TextLuminance
impl TextLuminance
Sourcepub fn of_color(color: Color) -> Self
pub fn of_color(color: Color) -> Self
The class of text drawn in color; alpha does not affect it.
Sourcepub fn of_brush(brush: &Brush) -> Self
pub fn of_brush(brush: &Brush) -> Self
The class of text painted with brush. Skia corrects text a shader
paints as mid grey, since no single color describes it.
Sourcepub fn correction(self) -> MaskGammaCorrection
pub fn correction(self) -> MaskGammaCorrection
The correction for glyph masks of this class.
Trait Implementations§
Source§impl Clone for TextLuminance
impl Clone for TextLuminance
impl Copy for TextLuminance
Source§impl Debug for TextLuminance
impl Debug for TextLuminance
impl Eq for TextLuminance
Source§impl Hash for TextLuminance
impl Hash for TextLuminance
Source§impl PartialEq for TextLuminance
impl PartialEq for TextLuminance
impl StructuralPartialEq for TextLuminance
Auto Trait Implementations§
impl Freeze for TextLuminance
impl RefUnwindSafe for TextLuminance
impl Send for TextLuminance
impl Sync for TextLuminance
impl Unpin for TextLuminance
impl UnsafeUnpin for TextLuminance
impl UnwindSafe for TextLuminance
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