1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-20 22:25:24 +00:00
OpenDiablo2/d2core/d2render/surface.go
Alex Yatskov 423cef304d
Screenshot and GIF recording capability (#310)
* Configuration cleanup

* Cleanup

* Gif animation and screenshot support
2020-02-22 23:59:45 -05:00

25 lines
531 B
Go

package d2render
import (
"image"
"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
Screenshot() *image.RGBA
}