mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
restorable: Fix doc
This commit is contained in:
parent
90ec2c79ce
commit
d220e300ab
@ -45,8 +45,11 @@ type Image struct {
|
|||||||
drawImageHistory []*drawImageHistoryItem
|
drawImageHistory []*drawImageHistoryItem
|
||||||
stale bool
|
stale bool
|
||||||
|
|
||||||
|
// volatile indicates whether the image is cleared at every frame.
|
||||||
volatile bool
|
volatile bool
|
||||||
screen bool
|
|
||||||
|
// screen indicates whether the image is used as an actual screen.
|
||||||
|
screen bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewImage(width, height int, filter opengl.Filter, volatile bool) *Image {
|
func NewImage(width, height int, filter opengl.Filter, volatile bool) *Image {
|
||||||
@ -162,7 +165,6 @@ func (p *Image) appendDrawImageHistory(image *Image, vertices []float32, colorm
|
|||||||
// At returns a color value at (x, y).
|
// At returns a color value at (x, y).
|
||||||
//
|
//
|
||||||
// Note that this must not be called until context is available.
|
// Note that this must not be called until context is available.
|
||||||
// This means Pixels members must match with acutal state in GPU.
|
|
||||||
func (p *Image) At(x, y int, context *opengl.Context) (color.RGBA, error) {
|
func (p *Image) At(x, y int, context *opengl.Context) (color.RGBA, error) {
|
||||||
w, h := p.image.Size()
|
w, h := p.image.Size()
|
||||||
w2, h2 := graphics.NextPowerOf2Int(w), graphics.NextPowerOf2Int(h)
|
w2, h2 := graphics.NextPowerOf2Int(w), graphics.NextPowerOf2Int(h)
|
||||||
|
Loading…
Reference in New Issue
Block a user