pub struct RenderCache { /* private fields */ }Expand description
Typesets an editor once per revision and keeps the geometry until the caret state changes.
Implementations§
Source§impl RenderCache
impl RenderCache
Sourcepub fn invalidate(&mut self)
pub fn invalidate(&mut self)
Forget everything, for a change the revision does not show such as a host box size or another editor.
Sourcepub fn view<L: FontLoader>(
&mut self,
editor: &Editor,
typesetter: &mut Typesetter<L>,
mode: MathMode,
boxes: &dyn HostBoxes,
) -> Result<&View, TypesetError>
pub fn view<L: FontLoader>( &mut self, editor: &Editor, typesetter: &mut Typesetter<L>, mode: MathMode, boxes: &dyn HostBoxes, ) -> Result<&View, TypesetError>
The view of editor, typesetting only when its revision changed since the last call.
Sourcepub fn hit_test<L: FontLoader>(
&mut self,
editor: &Editor,
typesetter: &mut Typesetter<L>,
mode: MathMode,
boxes: &dyn HostBoxes,
at: Point,
) -> Result<Option<CaretPath>, TypesetError>
pub fn hit_test<L: FontLoader>( &mut self, editor: &Editor, typesetter: &mut Typesetter<L>, mode: MathMode, boxes: &dyn HostBoxes, at: Point, ) -> Result<Option<CaretPath>, TypesetError>
The caret under at, in the coordinates of View::render.
Trait Implementations§
Source§impl Debug for RenderCache
impl Debug for RenderCache
Auto Trait Implementations§
impl Freeze for RenderCache
impl RefUnwindSafe for RenderCache
impl Send for RenderCache
impl Sync for RenderCache
impl Unpin for RenderCache
impl UnsafeUnpin for RenderCache
impl UnwindSafe for RenderCache
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