[−][src]Struct svgbob::buffer::PropertyBuffer
PropertyBuffer is a buffer which contains the property of each cell This will be used in the first phase of converting ascii diagrams into fragment buffer The properties are generated once and will be repeatedly used for the second phase where testing the neighboring charaters to determine the fragment to be drawn for that cell.
Methods
impl<'p> PropertyBuffer<'p>
[src]
pub fn new() -> Self
[src]
pub fn match_char_from_cell(
&self,
settings: &Settings,
cell: Cell,
fragments: &Vec<Fragment>,
try_unicode: bool
) -> Option<char>
[src]
&self,
settings: &Settings,
cell: Cell,
fragments: &Vec<Fragment>,
try_unicode: bool
) -> Option<char>
get the appropriate character for this cell that matches the its behavior affected by the 8 surrounding properties of it's neighbor
Note: this is primarily used for the drawing api, converting fragments into the most fitting ascii / unicode character
pub fn match_char_with_surrounding_properties(
settings: &Settings,
fragments: &Vec<Fragment>,
top_left: &Property,
top: &Property,
top_right: &Property,
left: &Property,
right: &Property,
bottom_left: &Property,
bottom: &Property,
bottom_right: &Property
) -> Option<char>
[src]
settings: &Settings,
fragments: &Vec<Fragment>,
top_left: &Property,
top: &Property,
top_right: &Property,
left: &Property,
right: &Property,
bottom_left: &Property,
bottom: &Property,
bottom_right: &Property
) -> Option<char>
if the fragments match to the return fragments of the property behavior, then it is a match
Trait Implementations
impl<'p> AsMut<HashMap<Cell, &'p Property, RandomState>> for PropertyBuffer<'p>
[src]
impl<'p> AsRef<HashMap<Cell, &'p Property, RandomState>> for PropertyBuffer<'p>
[src]
impl<'p, '_> Into<PropertyBuffer<'p>> for &'_ Span
[src]
create a property buffer for all the cells of this span
fn into(self) -> PropertyBuffer<'p>
[src]
Auto Trait Implementations
impl<'p> !RefUnwindSafe for PropertyBuffer<'p>
impl<'p> Send for PropertyBuffer<'p>
impl<'p> Sync for PropertyBuffer<'p>
impl<'p> Unpin for PropertyBuffer<'p>
impl<'p> !UnwindSafe for PropertyBuffer<'p>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,