-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgraphics.go
More file actions
29 lines (22 loc) · 672 Bytes
/
graphics.go
File metadata and controls
29 lines (22 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package graphics
import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/quasilyte/gmath"
)
type DrawOptions struct {
Offset gmath.Vec
Rotation gmath.Rad
// Blend is an optional blend mode override.
// You usually want to use a predefined blend from Ebitengine and
// assign it like DrawOptopns{Blend: &ebiten.BlendCopy}.
// We're using a pointer here mostly to decrease the [DrawOptions]
// object size as most of the time this field is going to be nil.
Blend *ebiten.Blend
}
type Object interface {
gsceneGraphics
DrawWithOptions(dst *ebiten.Image, o DrawOptions)
}
type PostProcessor interface {
PostProcess(dst, src *ebiten.Image, o DrawOptions)
}