1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-27 21:56:19 -04:00
OpenDiablo2/d2common/d2interface/surface.go
dk 55dc3e42ed
minor edits (#486)
* adding comments to d2interface for linter

* moved d2render renderer interfaces and types into d2interface
2020-06-29 00:41:58 -04:00

26 lines
570 B
Go

package d2interface
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)
PushBrightness(brightness float64)
Render(surface Surface) error
ReplacePixels(pixels []byte) error
Screenshot() *image.RGBA
}