summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2021-07-08 09:15:57 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2021-07-08 09:15:57 +0800
commit511a31df22a8a8053443ad28ae1f6a9f7ff70bea (patch)
treeb4589f979804b9f0356cbd5525a0ab14b60a3481
parent5358abe1d4b8809fac9e5a845cddbba33bdf3abd (diff)
Add TODO notes
-rw-r--r--svgbob/src/buffer/cell_buffer/cell.rs2
-rw-r--r--svgbob/src/buffer/cell_buffer/cell/cell_grid.rs4
2 files changed, 6 insertions, 0 deletions
diff --git a/svgbob/src/buffer/cell_buffer/cell.rs b/svgbob/src/buffer/cell_buffer/cell.rs
index 81150fe..db54d8b 100644
--- a/svgbob/src/buffer/cell_buffer/cell.rs
+++ b/svgbob/src/buffer/cell_buffer/cell.rs
@@ -192,6 +192,8 @@ impl Cell {
}
/// snap a point closest to any of the intersection of this cellgrid
+ /// Note: There are 4 horizontal mini cell for each cell
+ /// There are 8 vertical mini cell for each cell
#[inline]
fn snap_xy(x: f32, y: f32) -> Point {
let tx = (x * 4.0).round() / 4.0;
diff --git a/svgbob/src/buffer/cell_buffer/cell/cell_grid.rs b/svgbob/src/buffer/cell_buffer/cell/cell_grid.rs
index 6f07406..0e6f25a 100644
--- a/svgbob/src/buffer/cell_buffer/cell/cell_grid.rs
+++ b/svgbob/src/buffer/cell_buffer/cell/cell_grid.rs
@@ -152,11 +152,15 @@ impl CellGrid {
Self::point(4, 8)
}
+ //TODO: use proper aspect ratio for width
+ //and height based on the text rendering
#[inline]
pub fn width() -> f32 {
1.0
}
+ //TODO: use proper aspect ratio for width
+ //and height based on the text rendering
#[inline]
pub fn height() -> f32 {
2.0