Skip to main content

PipelineContext

Struct PipelineContext 

Source
pub struct PipelineContext { /* private fields */ }
Expand description

Everything a stage needs, nothing it doesn’t

The context flows from stage to stage, accumulating the results of each transformation. Text becomes glyphs, glyphs become pixels, and pixels become files - all tracked here.

Implementations§

Source§

impl PipelineContext

Source

pub fn new(text: String, font_spec: String) -> Self

Start fresh with text and a font specification

Source

pub fn text(&self) -> &str

Source

pub fn font_spec(&self) -> &str

Source

pub fn shaper(&self) -> Option<Arc<dyn Shaper>>

Source

pub fn renderer(&self) -> Option<Arc<dyn Renderer>>

Source

pub fn exporter(&self) -> Option<Arc<dyn Exporter>>

Source

pub fn font(&self) -> Option<Arc<dyn FontRef>>

Source

pub fn shaped(&self) -> Option<&ShapingResult>

Source

pub fn output(&self) -> Option<&RenderOutput>

Source

pub fn exported(&self) -> Option<&Vec<u8>>

Source

pub fn shaping_params(&self) -> &ShapingParams

Source

pub fn render_params(&self) -> &RenderParams

Source

pub fn set_shaper(&mut self, shaper: Arc<dyn Shaper>)

Source

pub fn set_renderer(&mut self, renderer: Arc<dyn Renderer>)

Source

pub fn set_exporter(&mut self, exporter: Arc<dyn Exporter>)

Source

pub fn set_font(&mut self, font: Arc<dyn FontRef>)

Source

pub fn set_shaped(&mut self, shaped: ShapingResult)

Source

pub fn set_output(&mut self, output: RenderOutput)

Source

pub fn set_exported(&mut self, exported: Vec<u8>)

Source

pub fn set_shaping_params(&mut self, params: ShapingParams)

Source

pub fn set_render_params(&mut self, params: RenderParams)

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> 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.