Skip to content

Commit

Permalink
fix screen.go see issue olup#18
Browse files Browse the repository at this point in the history
  • Loading branch information
cittadhammo committed Jan 18, 2024
1 parent 2cc4d27 commit cb27c63
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions screener/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ func printDiff(previous matrix.Matrix, next matrix.Matrix, fb *gofbink.FBInk, fo
fb.ClearScreen(&gofbink.FBInkConfig{
IsInverted: next[i][j].IsInverted,
NoRefresh: true,
}, &gofbink.FBInkRect{
Top: uint16(i * ttSize),
Left: uint16(j * ttWidth),
Height: uint16(ttSize),
Width: uint16(ttWidth),
})

fb.PrintOT(string(next[i][j].Content), &gofbink.FBInkOTConfig{
Expand Down Expand Up @@ -122,7 +117,7 @@ func printDiff(previous matrix.Matrix, next matrix.Matrix, fb *gofbink.FBInk, fo
}
}

fb.Refresh(0, 0, 0, 0, &gofbink.FBInkConfig{})
fb.Refresh(0, 0, 0, 0, gofbink.DitherFloydSteingberg ,&gofbink.FBInkConfig{})
}

func (s *Screen) PrintPng(imgBytes []byte, w int, h int, x int, y int) {
Expand Down Expand Up @@ -158,12 +153,12 @@ func (s *Screen) PrintAlert(message string, width int) {
}

func (s *Screen) Clear() {
s.fb.ClearScreen(&gofbink.FBInkConfig{}, &gofbink.FBInkRect{})
s.fb.ClearScreen(&gofbink.FBInkConfig{})
s.presentMatrix = matrix.FillMatrix(s.presentMatrix, ' ')
}

func (s *Screen) ClearFlash() {
s.fb.ClearScreen(&gofbink.FBInkConfig{IsFlashing: true}, &gofbink.FBInkRect{})
s.fb.ClearScreen(&gofbink.FBInkConfig{IsFlashing: true})
s.presentMatrix = matrix.FillMatrix(s.presentMatrix, ' ')
}

Expand Down

0 comments on commit cb27c63

Please sign in to comment.