pub struct LatexObj {
pub inner: Option<PngImage>,
pub expr: &'static str,
pub is_text: bool,
/* private fields */
}
Expand description
Represents a LaTeX expression. When loaded, this will create a PNG of the expression and load it.
Fields
inner: Option<PngImage>
The rendered document
expr: &'static str
The LaTeX expression that will be rendered
is_text: bool
A LaTeX expression can either be text or math, with math being surrounded by dollar sings
Implementations
Trait Implementations
sourceimpl Drawable for LatexObj
impl Drawable for LatexObj
sourcefn content_mut(&mut self) -> Vec<&mut dyn Drawable>
fn content_mut(&mut self) -> Vec<&mut dyn Drawable>
What this object contains, mutably
sourcefn draw(
&self,
canvas: &mut Canvas<Window>,
position: &Position,
settings: DrawSettings
)
fn draw(
&self,
canvas: &mut Canvas<Window>,
position: &Position,
settings: DrawSettings
)
Draw everything
sourceimpl ImageContainer for LatexObj
impl ImageContainer for LatexObj
sourcefn get_data_mut(&mut self) -> &mut Vec<u8>
fn get_data_mut(&mut self) -> &mut Vec<u8>
Retrieve the data in the image, mutably
sourcefn as_knownsize(&self) -> &dyn KnownSize
fn as_knownsize(&self) -> &dyn KnownSize
Convert the object to a dynamic KnownSize object, as rust doesn’t support calling KnownSize
-methods directly on this object Read more
Auto Trait Implementations
impl RefUnwindSafe for LatexObj
impl Send for LatexObj
impl Sync for LatexObj
impl Unpin for LatexObj
impl UnwindSafe for LatexObj
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more