func DrawLine(dst *ebiten.Image, x1, y1, x2, y2 float64, clr color.Color) {
	ew, eh := emptyImage.Size()
	length := math.Hypot(x2-x1, y2-y1)

	op := &ebiten.DrawImageOptions{}
	op.GeoM.Scale(length/float64(ew), 1/float64(eh))
	op.GeoM.Rotate(math.Atan2(y2-y1, x2-x1))
	op.GeoM.Translate(x1, y1)
	op.ColorM.Scale(colorScale(clr))
	// Filter must be 'nearest' filter (default).
	// Linear filtering would make edges blurred.
	_ = dst.DrawImage(emptyImage, op)
}
func DrawLine(dst *ebiten.Image, x1, y1, x2, y2 float64, clr color.Color) {
	ew, eh := emptyImage.Size()
	length := math.Hypot(x2-x1, y2-y1)

	op := &ebiten.DrawImageOptions{}
	op.GeoM.Scale(length/float64(ew), 1/float64(eh))
	op.GeoM.Rotate(math.Atan2(y2-y1, x2-x1))
	op.GeoM.Translate(x1, y1)
	op.ColorM.Scale(colorScale(clr))
	// Filter must be 'nearest' filter (default).
	// Linear filtering would make edges blurred.
	_ = dst.DrawImage(emptyImage, op)
}
func DrawLine ( dst * ebiten . Image , x1 , y1 , x2 , y2 float64 , clr color . Color ) { ew , eh := emptyImage . Size ( ) length := math . Hypot ( x2 - x1 , y2 - y1 ) op := & ebiten . DrawImageOptions { } op . GeoM . Scale ( length / float64 ( ew ) , 1 / float64 ( eh ) ) op . GeoM . Rotate ( math . Atan2 ( y2 - y1 , x2 - x1 ) ) op . GeoM . Translate ( x1 , y1 ) op . ColorM . Scale ( colorScale ( clr ) ) // Filter must be 'nearest' filter (default). // Linear filtering would make edges blurred. _ = dst . DrawImage ( emptyImage , op ) }
// DrawLine draws a line segment on the given destination dst.
//
// DrawLine is intended to be used mainly for debugging or prototyping purpose.
DrawLine draws a line segment on the given destination dst . DrawLine is intended to be used mainly for debugging or prototyping purpose .