fz_pixmap

Struct fz_pixmap 

Source
#[repr(C)]
pub struct fz_pixmap {
Show 16 fields pub storable: fz_storable, pub x: c_int, pub y: c_int, pub w: c_int, pub h: c_int, pub n: c_uchar, pub s: c_uchar, pub alpha: c_uchar, pub flags: c_uchar, pub stride: isize, pub seps: *mut fz_separations, pub xres: c_int, pub yres: c_int, pub colorspace: *mut fz_colorspace, pub samples: *mut c_uchar, pub underlying: *mut fz_pixmap,
}
Expand description

Pixmaps represent a set of pixels for a 2 dimensional region of
a plane. Each pixel has n components per pixel. The components
are in the order process-components, spot-colors, alpha, where
there can be 0 of any of those types. The data is in
premultiplied alpha when rendering, but non-premultiplied for
colorspace conversions and rescaling.

x, y: The minimum x and y coord of the region in pixels.

w, h: The width and height of the region in pixels.

n: The number of color components in the image.
n = num composite colors + num spots + num alphas

s: The number of spot channels in the image.

alpha: 0 for no alpha, 1 for alpha present.

flags: flag bits.
Bit 0: If set, draw the image with linear interpolation.
Bit 1: If set, free the samples buffer when the pixmap
is destroyed.

stride: The byte offset from the data for any given pixel
to the data for the same pixel on the row below.

seps: NULL, or a pointer to a separations structure. If NULL,
s should be 0.

xres, yres: Image resolution in dpi. Default is 96 dpi.

colorspace: Pointer to a colorspace object describing the
colorspace the pixmap is in. If NULL, the image is a mask.

samples: Pointer to the first byte of the pixmap sample data.
This is typically a simple block of memory w * h * n bytes of
memory in which the components are stored linearly, but with the
use of appropriate stride values, scanlines can be stored in
different orders, and have different amounts of padding. The
first n bytes are components 0 to n-1 for the pixel at (x,y).
Each successive n bytes gives another pixel in scanline order
as we move across the line. The start of each scanline is offset
the start of the previous one by stride bytes.

Fields§

§storable: fz_storable§x: c_int§y: c_int§w: c_int§h: c_int§n: c_uchar§s: c_uchar§alpha: c_uchar§flags: c_uchar§stride: isize§seps: *mut fz_separations§xres: c_int§yres: c_int§colorspace: *mut fz_colorspace§samples: *mut c_uchar§underlying: *mut fz_pixmap

Trait Implementations§

Source§

impl Clone for fz_pixmap

Source§

fn clone(&self) -> fz_pixmap

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for fz_pixmap

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for fz_pixmap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.