summaryrefslogtreecommitdiffstats
path: root/packages/svgbob/src/buffer
diff options
context:
space:
mode:
Diffstat (limited to 'packages/svgbob/src/buffer')
-rw-r--r--packages/svgbob/src/buffer/cell_buffer/cell.rs2
-rw-r--r--packages/svgbob/src/buffer/cell_buffer/endorse.rs2
-rw-r--r--packages/svgbob/src/buffer/cell_buffer/span.rs2
-rw-r--r--packages/svgbob/src/buffer/fragment_buffer/fragment/arc.rs4
-rw-r--r--packages/svgbob/src/buffer/fragment_buffer/fragment/circle.rs2
-rw-r--r--packages/svgbob/src/buffer/fragment_buffer/fragment/line.rs2
-rw-r--r--packages/svgbob/src/buffer/property_buffer.rs2
-rw-r--r--packages/svgbob/src/buffer/property_buffer/property.rs4
8 files changed, 10 insertions, 10 deletions
diff --git a/packages/svgbob/src/buffer/cell_buffer/cell.rs b/packages/svgbob/src/buffer/cell_buffer/cell.rs
index faf07b9..27b82bc 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 48e6fc2..bcf7fdb 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 {