pub enum Source<'a> {
Bilevel {
data: &'a [u8],
stride: usize,
},
Gray8 {
data: &'a [u8],
stride: usize,
},
Rgb8 {
data: &'a [u8],
stride: usize,
},
}Expand description
The source bitmap, as pdfium’s CPDF_DIB hands it to the engine.
Variants§
Bilevel
1 bit per pixel, most significant bit first, stride bytes per row —
pdfium’s k1bppRgb, expanded per row to 0/255 (Expand1BppRow) and
stretched as 8-bit; a palette, when the image has one, is applied to
the result by the caller (CFX_ImageStretcher builds the 256-entry
gradient for the destination bitmap).
Gray8
8-bit gray, no palette (k8bppRgb).
Rgb8
8-bit, three channels (kBgr; channel order is irrelevant to the
arithmetic, so the caller may pass RGB).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Source<'a>
impl<'a> RefUnwindSafe for Source<'a>
impl<'a> Send for Source<'a>
impl<'a> Sync for Source<'a>
impl<'a> Unpin for Source<'a>
impl<'a> UnsafeUnpin for Source<'a>
impl<'a> UnwindSafe for Source<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more