2020-06-29 04:41:58 +00:00
|
|
|
package d2interface
|
2020-02-01 04:18:11 +00:00
|
|
|
|
|
|
|
import (
|
2020-02-23 04:59:45 +00:00
|
|
|
"image"
|
2020-02-01 04:18:11 +00:00
|
|
|
"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)
|
2020-06-27 22:58:41 +00:00
|
|
|
PushBrightness(brightness float64)
|
2020-02-01 04:18:11 +00:00
|
|
|
Render(surface Surface) error
|
|
|
|
ReplacePixels(pixels []byte) error
|
2020-02-23 04:59:45 +00:00
|
|
|
Screenshot() *image.RGBA
|
2020-02-01 04:18:11 +00:00
|
|
|
}
|