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
impl PipelineContext
Sourcepub fn new(text: String, font_spec: String) -> Self
pub fn new(text: String, font_spec: String) -> Self
Start fresh with text and a font specification
pub fn text(&self) -> &str
pub fn font_spec(&self) -> &str
pub fn shaper(&self) -> Option<Arc<dyn Shaper>>
pub fn renderer(&self) -> Option<Arc<dyn Renderer>>
pub fn exporter(&self) -> Option<Arc<dyn Exporter>>
pub fn font(&self) -> Option<Arc<dyn FontRef>>
pub fn shaped(&self) -> Option<&ShapingResult>
pub fn output(&self) -> Option<&RenderOutput>
pub fn exported(&self) -> Option<&Vec<u8>>
pub fn shaping_params(&self) -> &ShapingParams
pub fn render_params(&self) -> &RenderParams
pub fn set_shaper(&mut self, shaper: Arc<dyn Shaper>)
pub fn set_renderer(&mut self, renderer: Arc<dyn Renderer>)
pub fn set_exporter(&mut self, exporter: Arc<dyn Exporter>)
pub fn set_font(&mut self, font: Arc<dyn FontRef>)
pub fn set_shaped(&mut self, shaped: ShapingResult)
pub fn set_output(&mut self, output: RenderOutput)
pub fn set_exported(&mut self, exported: Vec<u8>)
pub fn set_shaping_params(&mut self, params: ShapingParams)
pub fn set_render_params(&mut self, params: RenderParams)
Auto Trait Implementations§
impl Freeze for PipelineContext
impl !RefUnwindSafe for PipelineContext
impl Send for PipelineContext
impl Sync for PipelineContext
impl Unpin for PipelineContext
impl UnsafeUnpin for PipelineContext
impl !UnwindSafe for PipelineContext
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