1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-06 16:00:42 +00:00
OpenDiablo2/d2common/surface.go
Tim Sarbin 2461142fbd
Minor changes to project layout (#276)
* Minor changes to reduce interdependencies on modules.
2020-01-31 23:18:11 -05:00

23 lines
496 B
Go

package d2common
import (
"image/color"
)
type Surface interface {
Clear(color color.Color) error
DrawRect(width, height int, color color.Color)
DrawLine(x, y int, color color.Color)
DrawText(format string, params ...interface{})
GetSize() (width, height int)
GetDepth() int
Pop()
PopN(n int)
PushColor(color color.Color)
PushCompositeMode(mode CompositeMode)
PushFilter(filter Filter)
PushTranslation(x, y int)
Render(surface Surface) error
ReplacePixels(pixels []byte) error
}