mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2026-04-23 00:07:15 +08:00
@@ -20,6 +20,7 @@ package main
|
||||
import (
|
||||
"image/color"
|
||||
"log"
|
||||
"math"
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
@@ -99,6 +100,14 @@ func (g *Game) Draw(screen *ebiten.Image) {
|
||||
ebitenutil.DrawRect(screen, float64(b.Min.X+x), float64(b.Min.Y+y), float64(b.Dx()), float64(b.Dy()), gray)
|
||||
text.Draw(screen, sampleText, mplusBigFont, x, y, color.White)
|
||||
}
|
||||
{
|
||||
const x, y = 20, 240
|
||||
op := &ebiten.DrawImageOptions{}
|
||||
op.GeoM.Rotate(math.Pi / 4)
|
||||
op.GeoM.Translate(x, y)
|
||||
op.Filter = ebiten.FilterLinear
|
||||
text.DrawWithOptions(screen, sampleText, mplusNormalFont, op)
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) {
|
||||
|
||||
Reference in New Issue
Block a user