Skip to content

Commit

Permalink
refactor: move asciify to internal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jed Williamson committed Mar 27, 2023
1 parent 9d929eb commit e05fa45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cmd/asciicam.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"strings"
"time"

"github.com/lupinelab/asciicam/asciify"
"github.com/lupinelab/asciicam/internal"

"github.com/gdamore/tcell/v2"
Expand Down Expand Up @@ -254,7 +253,7 @@ var asciicamCmd = &cobra.Command{
scaledResolution := image.Point{X: int(settings.FrameWidth / scale), Y: int(settings.FrameHeight / (scale * 1.8))}

canvas.Clear()
asciify.Asciify(&frame, canvas, settings, termWidth, termHeight, scale, scaledResolution, defStyle)
internal.Asciify(&frame, canvas, settings, termWidth, termHeight, scale, scaledResolution, defStyle)

// Show info
if settings.ShowInfo {
Expand Down
6 changes: 2 additions & 4 deletions asciify/asciify.go → internal/asciify.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
package asciify
package internal

import (
"image"

"github.com/lupinelab/asciicam/internal"

"github.com/gdamore/tcell/v2"
"gocv.io/x/gocv"
)

// var ascii_symbols = []rune(".:-~=+*#%@")
var ascii_symbols = []rune(".,;!vlLFE$")

func Asciify(frame *gocv.Mat, canvas tcell.Screen, settings *internal.Settings, termWidth int, termHeight int, scale float64, scaledResolution image.Point, defStyle tcell.Style) {
func Asciify(frame *gocv.Mat, canvas tcell.Screen, settings *Settings, termWidth int, termHeight int, scale float64, scaledResolution image.Point, defStyle tcell.Style) {
pixStyle := tcell.StyleDefault.
Background(tcell.ColorReset).
Foreground(tcell.NewRGBColor(settings.Colour["R"], settings.Colour["G"], settings.Colour["B"]))
Expand Down

0 comments on commit e05fa45

Please sign in to comment.