2021-08-02 19:55:04 +00:00
|
|
|
package render
|
|
|
|
|
2023-01-16 02:18:08 +00:00
|
|
|
import "github.com/hajimehoshi/ebiten/v2"
|
|
|
|
|
2021-08-02 19:55:04 +00:00
|
|
|
func (r *Render) drawSixels() {
|
|
|
|
for _, sixel := range r.buffer.GetVisibleSixels() {
|
|
|
|
op := &ebiten.DrawImageOptions{}
|
|
|
|
op.GeoM.Translate(
|
|
|
|
float64(int(sixel.Sixel.X)*r.font.CellSize.X),
|
|
|
|
float64(sixel.ViewLineOffset*r.font.CellSize.Y),
|
|
|
|
)
|
|
|
|
r.frame.DrawImage(
|
|
|
|
ebiten.NewImageFromImage(sixel.Sixel.Image),
|
|
|
|
op,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|