2020-02-01 20:39:28 -05:00
|
|
|
package d2render
|
2020-01-31 23:18:11 -05:00
|
|
|
|
|
|
|
import (
|
2020-02-22 23:59:45 -05:00
|
|
|
"image"
|
2020-01-31 23:18:11 -05: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)
|
|
|
|
Render(surface Surface) error
|
|
|
|
ReplacePixels(pixels []byte) error
|
2020-02-22 23:59:45 -05:00
|
|
|
Screenshot() *image.RGBA
|
2020-01-31 23:18:11 -05:00
|
|
|
}
|