diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-06-09 23:16:50 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-06-09 23:18:06 +0200 |
commit | 9734cdd16e1b7572464dfaed3bd03a70db46a3d3 (patch) | |
tree | 470162274d9ef41184440ac40268b55c4550b118 /cmd | |
parent | 8215b59834d8a02cb43d34c55d9604dda7749cfd (diff) | |
download | sklad-9734cdd16e1b7572464dfaed3bd03a70db46a3d3.tar.gz sklad-9734cdd16e1b7572464dfaed3bd03a70db46a3d3.tar.xz sklad-9734cdd16e1b7572464dfaed3bd03a70db46a3d3.zip |
bdf: make it possible to set the drawing colour
Intended for red and black tapes.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bdf-preview/main.go | 3 | ||||
-rw-r--r-- | cmd/bdf-sample/main.go | 3 | ||||
-rw-r--r-- | cmd/label-tool/main.go | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/cmd/bdf-preview/main.go b/cmd/bdf-preview/main.go index c2edf5c..3632264 100644 --- a/cmd/bdf-preview/main.go +++ b/cmd/bdf-preview/main.go @@ -3,6 +3,7 @@ package main import ( "html/template" "image" + "image/color" "image/draw" "image/png" "log" @@ -82,7 +83,7 @@ func main() { img := image.NewRGBA(super) draw.Draw(img, super, image.White, image.ZP, draw.Src) - font.DrawString(img, image.ZP, font.Name) + font.DrawString(img, image.ZP, color.Black, font.Name) fonts[filename] = fontItem{Font: font, Preview: img} } diff --git a/cmd/bdf-sample/main.go b/cmd/bdf-sample/main.go index 1850118..e8a2b94 100644 --- a/cmd/bdf-sample/main.go +++ b/cmd/bdf-sample/main.go @@ -2,6 +2,7 @@ package main import ( "image" + "image/color" "image/draw" "image/png" "log" @@ -26,7 +27,7 @@ func main() { img := image.NewRGBA(super) draw.Draw(img, super, image.White, image.ZP, draw.Src) - font.DrawString(img, image.ZP, font.Name) + font.DrawString(img, image.ZP, color.Black, font.Name) fo, err := os.Create("out.png") if err != nil { diff --git a/cmd/label-tool/main.go b/cmd/label-tool/main.go index d2ac4f9..893aa13 100644 --- a/cmd/label-tool/main.go +++ b/cmd/label-tool/main.go @@ -4,6 +4,7 @@ import ( "errors" "html/template" "image" + "image/color" "image/draw" "image/png" "log" @@ -260,7 +261,7 @@ func main() { img := image.NewRGBA(super) draw.Draw(img, super, image.White, image.ZP, draw.Src) - font.DrawString(img, image.ZP, font.Name) + font.DrawString(img, image.ZP, color.Black, font.Name) fonts = append(fonts, &fontItem{Path: path, Font: font, Preview: img}) } |