pub struct RenderEngine { /* private fields */ }Expand description
The main rendering engine.
Coordinates font atlas management, text shaping, and compositing.
Implementations§
Source§impl RenderEngine
impl RenderEngine
Sourcepub fn new(config: RenderConfig) -> Self
pub fn new(config: RenderConfig) -> Self
Create a new rendering engine with the given configuration.
Sourcepub fn register_font(&mut self, family: &str)
pub fn register_font(&mut self, family: &str)
Register a font family for rendering.
Sourcepub fn config(&self) -> &RenderConfig
pub fn config(&self) -> &RenderConfig
Get the current configuration.
Sourcepub fn render_tokens(
&self,
tokens: &[TokenInfo],
annotator: &ScopeAnnotator,
) -> Result<Vec<RenderedLine>, RenderError>
pub fn render_tokens( &self, tokens: &[TokenInfo], annotator: &ScopeAnnotator, ) -> Result<Vec<RenderedLine>, RenderError>
Render a sequence of tokens into positioned glyphs.
Returns Err(RenderError::NoBackend) until a rendering backend is initialized.
Auto Trait Implementations§
impl Freeze for RenderEngine
impl RefUnwindSafe for RenderEngine
impl Send for RenderEngine
impl Sync for RenderEngine
impl Unpin for RenderEngine
impl UnsafeUnpin for RenderEngine
impl UnwindSafe for RenderEngine
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