pub struct RenderContext<'t, 'f> { /* private fields */ }Implementations§
Source§impl<'t, 'f> RenderContext<'t, 'f>
impl<'t, 'f> RenderContext<'t, 'f>
pub fn new<T>(render_target: &'t mut T) -> Selfwhere
T: RenderTarget<'f>,
pub fn flush(&mut self)
pub fn width(&self) -> f32
pub fn height(&self) -> Option<f32>
pub fn font_library(&self) -> &'f FontLibrary
pub fn style(&self) -> &Style
pub fn line_width(&mut self, line_width: f32)
pub fn font_id(&mut self, font_id: u32)
pub fn font(&mut self, font_family: &str, font_variant: FontVariant)
pub fn font_family(&mut self, font_family: &str)
pub fn font_variant(&mut self, font_variant: FontVariant)
pub fn underline(&mut self, underline: bool)
pub fn font_size(&mut self, font_size: f32)
pub fn line_height(&mut self, line_height: f32)
pub fn enable_scripts(&mut self, scripts: impl Into<ScriptSet>)
pub fn disable_scripts(&mut self, scripts: impl Into<ScriptSet>)
pub fn enable_languages(&mut self, languages: impl Into<LanguageSet>)
pub fn disable_languages(&mut self, languages: impl Into<LanguageSet>)
pub fn enable_features(&mut self, features: impl Into<FeatureSet>)
pub fn disable_features(&mut self, features: impl Into<FeatureSet>)
pub fn draw_color(&mut self, draw_color: Color)
pub fn fill_color(&mut self, fill_color: Color)
pub fn text_color(&mut self, text_color: Color)
pub fn block(&self) -> Block<'f>
pub fn fits(&self, h: f32) -> bool
pub fn put(&mut self, block: &Block<'_>)
pub fn place(&mut self, origin: (f32, f32), block: &Block<'_>)
pub fn cursor(&self) -> (f32, f32)
pub fn indent(&mut self, left: f32, right: f32)
pub fn unindent(&mut self, left: f32, right: f32)
pub fn path(&mut self) -> PathContext<'_>
pub fn line(&mut self, start: (f32, f32), stop: (f32, f32))
pub fn rectangle( &mut self, origin: (f32, f32), size: (f32, f32), style: PathStyle, )
pub fn rounded_rectangle( &mut self, origin: (f32, f32), size: (f32, f32), radius: (f32, f32, f32, f32), style: PathStyle, )
pub fn text(&mut self, origin: (f32, f32), text: &str)
pub fn text_width(&self, text: &str) -> f32
pub fn cell( &mut self, w: f32, text: &str, border: impl Into<BorderSet>, target: CursorTarget, align: TextAlign, fill: bool, )
pub fn write_nb(&mut self, text: &str, target: CursorTarget)
pub fn write(&mut self, text: &str, target: CursorTarget)
pub fn ln(&mut self, h: impl Into<Option<f32>>)
pub fn image(&mut self, image: ImageRef, origin: (f32, f32), size: (f32, f32))
Auto Trait Implementations§
impl<'t, 'f> Freeze for RenderContext<'t, 'f>
impl<'t, 'f> !RefUnwindSafe for RenderContext<'t, 'f>
impl<'t, 'f> !Send for RenderContext<'t, 'f>
impl<'t, 'f> !Sync for RenderContext<'t, 'f>
impl<'t, 'f> Unpin for RenderContext<'t, 'f>
impl<'t, 'f> !UnwindSafe for RenderContext<'t, 'f>
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