diff options
Diffstat (limited to 'packages/svgbob')
-rw-r--r-- | packages/svgbob/spec.md | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/cell_buffer/cell.rs | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/cell_buffer/endorse.rs | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/cell_buffer/span.rs | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/fragment_buffer/fragment/arc.rs | 4 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/fragment_buffer/fragment/circle.rs | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/fragment_buffer/fragment/line.rs | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/property_buffer.rs | 2 | ||||
-rw-r--r-- | packages/svgbob/src/buffer/property_buffer/property.rs | 4 | ||||
-rw-r--r-- | packages/svgbob/test_data/long.bob | 24 |
10 files changed, 23 insertions, 23 deletions
diff --git a/packages/svgbob/spec.md b/packages/svgbob/spec.md index b1f5c5c..50a0fb0 100644 --- a/packages/svgbob/spec.md +++ b/packages/svgbob/spec.md @@ -6,7 +6,7 @@ Svgbob is a diagramming model which uses common typing characters to approximate |characters| names | description |----------|----------------------|------------ -| `-` | dash, hypen, minus | for horizontal lines +| `-` | dash, hyphen, minus | for horizontal lines | `_` | underscore | for horizontal lines | `\|` | pipe, or | for vertical lines | `/` | forward slash | for lines slanted to the right diff --git a/packages/svgbob/src/buffer/cell_buffer/cell.rs b/packages/svgbob/src/buffer/cell_buffer/cell.rs index 237edf8..286b6cb 100644 --- a/packages/svgbob/src/buffer/cell_buffer/cell.rs +++ b/packages/svgbob/src/buffer/cell_buffer/cell.rs @@ -57,7 +57,7 @@ impl Ord for Cell { macro_rules! cell_grid { ($($a:ident),*) => { - /// The point at sepcific cell grid of this cell + /// The point at specific cell grid of this cell $(pub fn $a(&self) -> Point { self.top_left_most() + CellGrid::$a() })* diff --git a/packages/svgbob/src/buffer/cell_buffer/endorse.rs b/packages/svgbob/src/buffer/cell_buffer/endorse.rs index 5f1808a..6f4e514 100644 --- a/packages/svgbob/src/buffer/cell_buffer/endorse.rs +++ b/packages/svgbob/src/buffer/cell_buffer/endorse.rs @@ -67,7 +67,7 @@ fn is_rect(fragments: &[&Fragment]) -> bool { /// qualifications: /// - 8 fragments -/// - 2 parallell pair +/// - 2 parallel pair /// - 4 aabb right angle arc (top_left, top_right, bottom_left, bottom_right) /// - each of the right angle touches 2 lines that are aabb_perpendicular pub fn endorse_rounded_rect(fragments: &[&Fragment]) -> Option<Rect> { diff --git a/packages/svgbob/src/buffer/cell_buffer/span.rs b/packages/svgbob/src/buffer/cell_buffer/span.rs index 39a8299..b388542 100644 --- a/packages/svgbob/src/buffer/cell_buffer/span.rs +++ b/packages/svgbob/src/buffer/cell_buffer/span.rs @@ -57,7 +57,7 @@ impl Span { } /// if any cell of this span is adjacent to any cell of the other - /// Use .rev() to check the last cell of this Span agains the first cell of the other Span + /// Use .rev() to check the last cell of this Span against the first cell of the other Span /// They have a high change of matching faster pub(super) fn can_merge(&self, other: &Self) -> bool { self.iter().rev().any(|(cell, _)| { diff --git a/packages/svgbob/src/buffer/fragment_buffer/fragment/arc.rs b/packages/svgbob/src/buffer/fragment_buffer/fragment/arc.rs index 152e1a9..d879a19 100644 --- a/packages/svgbob/src/buffer/fragment_buffer/fragment/arc.rs +++ b/packages/svgbob/src/buffer/fragment_buffer/fragment/arc.rs @@ -7,7 +7,7 @@ use sauron::{ }; use std::{cmp::Ordering, fmt}; -/// TODO: Add an is_broken field when there is a presense of `~` or `!` in the span +/// TODO: Add an is_broken field when there is a presence of `~` or `!` in the span #[derive(Debug, Clone)] pub struct Arc { pub start: Point, @@ -139,7 +139,7 @@ impl Arc { } /// check to see if the arc is aabb right angle - /// that is the center x and y coordinate is alinged to both of the end points + /// that is the center x and y coordinate is aligned to both of the end points /// This will be used for checking if group of fragments can be a rounded rect pub fn is_aabb_right_angle_arc(&self) -> bool { let center = self.center(); diff --git a/packages/svgbob/src/buffer/fragment_buffer/fragment/circle.rs b/packages/svgbob/src/buffer/fragment_buffer/fragment/circle.rs index f8c64ca..429b728 100644 --- a/packages/svgbob/src/buffer/fragment_buffer/fragment/circle.rs +++ b/packages/svgbob/src/buffer/fragment_buffer/fragment/circle.rs @@ -13,7 +13,7 @@ use sauron::{ Node, }; -/// TODO: Add an is_broken field when there is a presense of `~` or `!` in the span +/// TODO: Add an is_broken field when there is a presence of `~` or `!` in the span #[derive(Debug, Clone)] pub struct Circle { pub radius: f32, diff --git a/packages/svgbob/src/buffer/fragment_buffer/fragment/line.rs b/packages/svgbob/src/buffer/fragment_buffer/fragment/line.rs index aa1aa87..1b656f0 100644 --- a/packages/svgbob/src/buffer/fragment_buffer/fragment/line.rs +++ b/packages/svgbob/src/buffer/fragment_buffer/fragment/line.rs @@ -366,7 +366,7 @@ impl Line { Line::new_noswap(self.start, Point::new(cx, cy), self.is_broken) } - /// extend but on the oposite direction + /// extend but on the opposite direction /// TODO: This implementation is hacky pub fn extend_start(&self, length: f32) -> Self { let mut tmp_line = self.clone(); diff --git a/packages/svgbob/src/buffer/property_buffer.rs b/packages/svgbob/src/buffer/property_buffer.rs index c55c8bb..a91a475 100644 --- a/packages/svgbob/src/buffer/property_buffer.rs +++ b/packages/svgbob/src/buffer/property_buffer.rs @@ -12,7 +12,7 @@ mod property; /// 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. +/// where testing the neighboring characters to determine the fragment to be drawn for that cell. #[derive(Default, Clone)] pub struct PropertyBuffer<'p>(HashMap<Cell, &'p Property>); diff --git a/packages/svgbob/src/buffer/property_buffer/property.rs b/packages/svgbob/src/buffer/property_buffer/property.rs index de2678d..5fe2684 100644 --- a/packages/svgbob/src/buffer/property_buffer/property.rs +++ b/packages/svgbob/src/buffer/property_buffer/property.rs @@ -59,7 +59,7 @@ pub struct Property { signature: Vec<(Signal, Vec<Fragment>)>, /// behavior is the final output of fragments of the spot character - /// depending on flag that is meet when checked agains the surrounding characters + /// depending on flag that is meet when checked against the surrounding characters pub behavior: Arc< dyn Fn( &Property, @@ -123,7 +123,7 @@ impl Property { } } - /// empty property serves as a substitue for None property for simplicity in + /// empty property serves as a substitute for None property for simplicity in /// the behavior code, never have to deal with Option pub fn empty() -> Self { Property { diff --git a/packages/svgbob/test_data/long.bob b/packages/svgbob/test_data/long.bob index 5c4660d..3c4fed1 100644 --- a/packages/svgbob/test_data/long.bob +++ b/packages/svgbob/test_data/long.bob @@ -620,15 +620,15 @@ test测试--> 测试test . . |\ /\ /| - _____| \_____/ \________/ |__________ - ,' -> create Ascii art `. - / -> draw sketches for e-mails \ -| -> comment source code of programs | -| -> diagrams for visually handicaped people ( -| -> more dialogs > -| ( - \ -> ... / - `._______ ____ ____ ___ __________,' + _____| \_____/ \________/ |___________ + ,' -> create Ascii art `. + / -> draw sketches for e-mails \ +| -> comment source code of programs | +| -> diagrams for visually handicapped people ( +| -> more dialogs > +| ( + \ -> ... / + `._______ ____ ____ ___ ___________,' /,' | / \ | `.\ /' |/ \| `\ . . @@ -864,7 +864,7 @@ What can it do? V /| \ '-----> Reception Team / . \ v /| \ - Worklaod / . '-->> Career change + Workload / . '-->> Career change V / PTO / V @@ -1036,7 +1036,7 @@ Board `------------------- _______ _ _.-'|+__|__-|'-._,.-(((_) -There,a battery powering a tessla coil. +There, a battery powering a tesla coil. +10-15V ___0,047R @@ -1512,7 +1512,7 @@ IN>----||------+-------| 2N2222 O<--||---> High impedance output | | --- - \ / LED (glows when 555 ouput is high) + \ / LED (glows when 555 output is high) V --- | |