pub struct Painter { /* private fields */ }Expand description
The font atlas and images, decoded, ready to render any number of frames.
Implementations§
Source§impl Painter
impl Painter
Sourcepub fn new(
atlas: FontAtlasDef,
atlas_image: Image,
images: BTreeMap<ImageId, Image>,
clear: Rgb,
) -> Self
pub fn new( atlas: FontAtlasDef, atlas_image: Image, images: BTreeMap<ImageId, Image>, clear: Rgb, ) -> Self
A painter of font atlas atlas, whose picture is atlas_image,
with images (an image not among them draws as a MISSING_COLOR
rectangle). clear is the console background (the palette’s
black).
Sourcepub fn render(&self, buf: &GlyphBuffer, scale: u32) -> Image
pub fn render(&self, buf: &GlyphBuffer, scale: u32) -> Image
Draws buf with each console pixel scale × scale pixels big.
With a backdrop (game ADR-0048): the clear colour, the scene inside its
window, then the console over it, as in app.
Auto Trait Implementations§
impl Freeze for Painter
impl RefUnwindSafe for Painter
impl Send for Painter
impl Sync for Painter
impl Unpin for Painter
impl UnsafeUnpin for Painter
impl UnwindSafe for Painter
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