Fill

Let's see the most fundamental drawing command, Fill.

Code


The result will be like this:

How the code works


  

(*ebiten.Image).Fill is a function to fill the image with the specified color. The argument color is a value that implements color.Color interface in the standard image/color package. In this example, the color value is red (the red and alpha part is 0xff.)

背景填充

让我们来看一下最基本的绘制命令, Fill.

代码


  

结果大概是这样:

工作原理


    

(*ebiten.Image).Fill is a function to fill the image with the specified color. The argument color is a value that implements color.Color interface in the standard image/color package. In this example, the color value is red (the red and alpha part is 0xff.)