// Image draws an image to a screen.
//
// Center is the center of the image relative to the screen's center, with
// center = 0, 0 meaning that the image is perfectly centered in the screen.
Image draws an image to a screen.

Center is the center of the image relative to the screen's center, with
center = 0, 0 meaning that the image is perfectly centered in the screen.
// Image draws an image to a screen . // // Center is the center of the image relative to the screen ' s center with // center = 0 0 meaning that the image is perfectly centered in the screen .
func Image(s tcell.Screen, rgbRunes conversion.RGBRunes, center image.Point) {
	width, height := rgbRunes.Width(), rgbRunes.Height()
	screenWidth, screenHeight := s.Size()
	xOrigin := screenWidth / 2
	yOrigin := (screenHeight - TitleBarPixels) / 2
	for x := 0; x < width; x++ {
		for y := 0; y < height; y++ {
			if (yOrigin-height/2)+y+center.Y < 0 {
				continue
			}
			rgbRune := rgbRunes.At(x, y)
			runeColor := tcell.FromImageColor(rgbRune)
			runeStyle := tcell.StyleDefault.Foreground(runeColor)
			s.SetContent(
				(xOrigin-width/2)+(x+center.X),
				(yOrigin-height/2)+(y+center.Y)+TitleBarPixels,
				rgbRune.Rune,
				nil,
				runeStyle,
			)
		}
	}
}
func Image ( s tcell . Screen , rgbRunes conversion . RGBRunes , center image . Point ) { width , height := rgbRunes . Width ( ) , rgbRunes . Height ( ) screenWidth , screenHeight := s . Size ( ) xOrigin := screenWidth / 2 yOrigin := ( screenHeight - TitleBarPixels ) / 2 for x := 0 ; x < width ; x ++ { for y := 0 ; y < height ; y ++ { if ( yOrigin - height / 2 ) + y + center . Y < 0 { continue } rgbRune := rgbRunes . At ( x , y ) runeColor := tcell . FromImageColor ( rgbRune ) runeStyle := tcell . StyleDefault . Foreground ( runeColor ) s . SetContent ( ( xOrigin - width / 2 ) + ( x + center . X ) , ( yOrigin - height / 2 ) + ( y + center . Y ) + TitleBarPixels , rgbRune . Rune , nil , runeStyle , ) } } }
Image draws an image to a screen.
Image draws an image to a screen .