docs: Update

This commit is contained in:
Hajime Hoshi 2018-02-14 02:59:22 +09:00
parent 5ed5cceb43
commit aa39c12d28
17 changed files with 28 additions and 22 deletions

View File

@ -82,7 +82,7 @@ func update(screen *ebiten.Image) error {
func main() {
var err error
ebitenImage, _, err = ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterNearest)
ebitenImage, _, err = ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -98,7 +98,7 @@ func update(screen *ebiten.Image) error {
func main() {
var err error
ebitenImage, _, err = ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterNearest)
ebitenImage, _, err = ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -66,7 +66,7 @@ func init() {
log.Fatal(err)
}
eimg, err := ebiten.NewImageFromImage(img, ebiten.FilterLinear)
eimg, err := ebiten.NewImageFromImage(img, ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}
@ -113,6 +113,8 @@ func update(screen *ebiten.Image) error {
// Move the image's center to the screen's center.
op.GeoM.Translate(float64(sw)/2, float64(sh)/2)
op.Filter = ebiten.FilterLinear
screen.DrawImage(highDPIImage, op)
ebitenutil.DebugPrint(screen, fmt.Sprintf("Device Scale Ratio: %0.2f", scale))

View File

@ -140,7 +140,7 @@ Inverted: %s [I]`, hue, saturation, value, msgInverted)
func main() {
var err error
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest)
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -71,7 +71,7 @@ func update(screen *ebiten.Image) error {
func main() {
var err error
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest)
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -51,7 +51,7 @@ var (
func init() {
var err error
bgImage, _, err = ebitenutil.NewImageFromFile("_resources/images/tile.png", ebiten.FilterNearest)
bgImage, _, err = ebitenutil.NewImageFromFile("_resources/images/tile.png", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -50,7 +50,7 @@ var keyboardImage *ebiten.Image
func init() {
var err error
keyboardImage, _, err = ebitenutil.NewImageFromFile("_resources/images/keyboard/keyboard.png", ebiten.FilterNearest)
keyboardImage, _, err = ebitenutil.NewImageFromFile("_resources/images/keyboard/keyboard.png", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -51,7 +51,7 @@ var (
)
func init() {
offscreen, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterNearest)
offscreen, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterDefault)
offscreenPix = make([]byte, screenWidth*screenHeight*4)
for i := range palette {
palette[i] = byte(math.Sqrt(float64(i)/float64(len(palette))) * 0x80)

View File

@ -60,17 +60,17 @@ var (
func init() {
var err error
bgImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest)
bgImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}
fgImage, _, err = ebitenutil.NewImageFromFile("_resources/images/fiveyears.jpg", ebiten.FilterNearest)
fgImage, _, err = ebitenutil.NewImageFromFile("_resources/images/fiveyears.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}
maskedFgImage, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterNearest)
maskedFgImage, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterDefault)
// Initialize the spot light image.
const r = 64
@ -85,7 +85,7 @@ func init() {
a.SetAlpha(i, j, color.Alpha{b})
}
}
spotLightImage, _ = ebiten.NewImageFromImage(a, ebiten.FilterNearest)
spotLightImage, _ = ebiten.NewImageFromImage(a, ebiten.FilterDefault)
}
func update(screen *ebiten.Image) error {

View File

@ -53,7 +53,7 @@ var (
func init() {
var err error
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest)
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}
@ -79,7 +79,7 @@ func update(screen *ebiten.Image) error {
func main() {
w, h := gophersImage.Size()
gophersRenderTarget, _ = ebiten.NewImage(w/mosaicRatio, h/mosaicRatio, ebiten.FilterNearest)
gophersRenderTarget, _ = ebiten.NewImage(w/mosaicRatio, h/mosaicRatio, ebiten.FilterDefault)
if err := ebiten.Run(update, screenWidth, screenHeight, 2, "Mosaic (Ebiten Demo)"); err != nil {
log.Fatal(err)
}

View File

@ -69,9 +69,9 @@ func init() {
Pix: pixels,
Stride: 4,
Rect: image.Rect(0, 0, 4, 4),
}, ebiten.FilterNearest)
}, ebiten.FilterDefault)
canvasImage, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterNearest)
canvasImage, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterDefault)
canvasImage.Fill(color.White)
}

View File

@ -81,7 +81,7 @@ func update(screen *ebiten.Image) error {
func main() {
var err error
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest)
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -179,7 +179,7 @@ var (
)
func init() {
pianoImage, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterNearest)
pianoImage, _ = ebiten.NewImage(screenWidth, screenHeight, ebiten.FilterDefault)
const (
keyWidth = 24

View File

@ -75,7 +75,7 @@ func update(screen *ebiten.Image) error {
func main() {
var err error
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterNearest)
gophersImage, _, err = ebitenutil.NewImageFromFile("_resources/images/gophers.jpg", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

View File

@ -105,12 +105,12 @@ var (
)
func init() {
img, _, err := ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterNearest)
img, _, err := ebitenutil.NewImageFromFile("_resources/images/ebiten.png", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}
w, h := img.Size()
ebitenImage, _ = ebiten.NewImage(w, h, ebiten.FilterNearest)
ebitenImage, _ = ebiten.NewImage(w, h, ebiten.FilterDefault)
op := &ebiten.DrawImageOptions{}
op.ColorM.Scale(1, 1, 1, 0.5)
ebitenImage.DrawImage(img, op)

View File

@ -57,7 +57,7 @@ var (
func init() {
var err error
tilesImage, _, err = ebitenutil.NewImageFromFile("_resources/images/tiles.png", ebiten.FilterNearest)
tilesImage, _, err = ebitenutil.NewImageFromFile("_resources/images/tiles.png", ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}

4
docs/images/logo.txt Normal file
View File

@ -0,0 +1,4 @@
Red: 0080-Y70R #DD664F
Yellow1: 0080-Y #FFDB33
Yellow2: 0080-Y10R #FACB37
Yellow3: 0080-Y20R #F5BA3B