summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/draw/full.go4
-rw-r--r--pkg/draw/full_escape.go9
2 files changed, 12 insertions, 1 deletions
diff --git a/pkg/draw/full.go b/pkg/draw/full.go
index 6f234b0..dccdd9f 100644
--- a/pkg/draw/full.go
+++ b/pkg/draw/full.go
@@ -2,10 +2,12 @@ package draw
var _ Pixels = &Full{}
+const fullBlock = '█'
+
type Full struct{ *Buffer }
func (b *Full) Size() Box { return b.Box }
-func (b *Full) Set(y, x int) { b.Buffer.Set(y, x, '█') }
+func (b *Full) Set(y, x int) { b.Buffer.Set(y, x, fullBlock) }
func (b *Full) Clear() { b.Fill(' ') }
diff --git a/pkg/draw/full_escape.go b/pkg/draw/full_escape.go
new file mode 100644
index 0000000..e6a68de
--- /dev/null
+++ b/pkg/draw/full_escape.go
@@ -0,0 +1,9 @@
+package draw
+
+import "strings"
+
+const invertedSpace = "\033[7m \033[27m"
+
+func FullEscape(full string) string {
+ return strings.Replace(full, string(fullBlock), invertedSpace, -1)
+}