pub struct Halfblocks { /* private fields */ }Implementations§
Source§impl Halfblocks
impl Halfblocks
Sourcepub fn new(image: DynamicImage, area: Rect) -> Result<Self, Errors>
pub fn new(image: DynamicImage, area: Rect) -> Result<Self, Errors>
Create a FixedHalfblocks from an image.
The “resolution” is determined by the font size of the terminal. Smaller fonts will result in more half-blocks for the same image size. To get a size independent of the font size, the image could be resized in relation to the font size beforehand. Also note that the font-size is probably just some arbitrary size with a 1:2 ratio when the protocol is Halfblocks, and not the actual font size of the terminal.
Trait Implementations§
Source§impl Clone for Halfblocks
impl Clone for Halfblocks
Source§fn clone(&self) -> Halfblocks
fn clone(&self) -> Halfblocks
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for Halfblocks
impl Default for Halfblocks
Source§fn default() -> Halfblocks
fn default() -> Halfblocks
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Halfblocks
impl RefUnwindSafe for Halfblocks
impl Send for Halfblocks
impl Sync for Halfblocks
impl Unpin for Halfblocks
impl UnwindSafe for Halfblocks
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().