pub struct TransferFunc {
pub samples: Box<[[u8; 256]; 3]>,
pub identity: bool,
}Expand description
Three 256-entry byte tables, one per channel.
Fields§
§samples: Box<[[u8; 256]; 3]>The samples, indexed [channel][input] with channel 0 red, 1 green
and 2 blue.
A consumer indexes by channel and nothing else. [oracle-bug]
channel 0 holds /TR’s first element (table 58’s red), not its
last; see the module note.
identity: boolWhether every entry is its own index, in which case the function is a no-op and a renderer may skip it entirely.
Implementations§
Source§impl TransferFunc
impl TransferFunc
Sourcepub fn load<R: Resolve>(
obj: &Object,
r: &R,
cache: &mut FunctionCache,
limits: &Limits,
diags: &mut Diagnostics,
) -> Option<Self>
pub fn load<R: Resolve>( obj: &Object, r: &R, cache: &mut FunctionCache, limits: &Limits, diags: &mut Diagnostics, ) -> Option<Self>
Sample a /TR or /TR2 object.
Returns None for every shape PDFium refuses: a name, a
three-or-more-element array with a bad entry, or an object that is
neither a function nor an array of them.
Trait Implementations§
Source§impl Clone for TransferFunc
impl Clone for TransferFunc
Source§fn clone(&self) -> TransferFunc
fn clone(&self) -> TransferFunc
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 TransferFunc
impl Debug for TransferFunc
Source§impl PartialEq for TransferFunc
impl PartialEq for TransferFunc
impl StructuralPartialEq for TransferFunc
Auto Trait Implementations§
impl Freeze for TransferFunc
impl RefUnwindSafe for TransferFunc
impl Send for TransferFunc
impl Sync for TransferFunc
impl Unpin for TransferFunc
impl UnsafeUnpin for TransferFunc
impl UnwindSafe for TransferFunc
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