pub struct LcdDistributionLut { /* private fields */ }Expand description
Lookup table for LCD subpixel coverage distribution.
Distributes each coverage value across primary (center), secondary (adjacent), and tertiary (2-away) positions. This implements the energy distribution described in Steve Gibson’s subpixel rendering guide.
Port of C++ lcd_distribution_lut from agg_pixfmt_rgb24_lcd.h.
Implementations§
Source§impl LcdDistributionLut
impl LcdDistributionLut
Sourcepub fn new(prim: f64, second: f64, tert: f64) -> Self
pub fn new(prim: f64, second: f64, tert: f64) -> Self
Create a new LCD distribution lookup table.
§Arguments
prim— Weight for the primary (center) subpixelsecond— Weight for the secondary (adjacent) subpixelstert— Weight for the tertiary (2-away) subpixels
Weights are normalized so that prim + 2*second + 2*tert = 1.0.
Auto Trait Implementations§
impl Freeze for LcdDistributionLut
impl RefUnwindSafe for LcdDistributionLut
impl Send for LcdDistributionLut
impl Sync for LcdDistributionLut
impl Unpin for LcdDistributionLut
impl UnwindSafe for LcdDistributionLut
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