small software-rendered rust tty
strikethrough
bendn 9 months ago
parent 125333e · commit 41a8a05
-rw-r--r--src/render.rs10
-rw-r--r--x8
2 files changed, 13 insertions, 5 deletions
diff --git a/src/render.rs b/src/render.rs
index 1f86493..e0ecd1d 100644
--- a/src/render.rs
+++ b/src/render.rs
@@ -51,6 +51,16 @@ pub fn render(
)
};
}
+ if (cell.style.flags & crate::term::STRIKETHROUGH) != 0 {
+ unsafe {
+ i.as_mut().overlay_at(
+ &Image::<_, 4>::build(sz.ceil() as u32, 2)
+ .fill(color.join(255)),
+ 4 + (j as f32 * sz) as u32,
+ (k as f32 * (ppem * 1.25)) as u32 - 5,
+ )
+ };
+ }
if let Some(l) = cell.letter {
let f = if (cell.style.flags & crate::term::ITALIC) != 0 {
*IFONT
diff --git a/x b/x
index 4f75052..3480b31 100644
--- a/x
+++ b/x
@@ -1,5 +1,3 @@
-[?2004h[os@klunk pattypan]$ echo -e '\x1b[2;4;34m ya'
-[?2004l  ya
-[?2004h[os@klunk pattypan]$ i guess that works.
-[?2004l bash: i: command not found
-[?2004h[os@klunk pattypan]$ � \ No newline at end of file
+[?2004h[os@klunk pattypan]$ echo -e '\x1b[9;2;4;34m ya'
+[?2004l  ya
+[?2004h[os@klunk pattypan]$ \ No newline at end of file