mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/restorable: update comments
This commit is contained in:
parent
6179158812
commit
18fa00d25d
@ -213,8 +213,7 @@ func (i *Image) Extend(width, height int) *Image {
|
|||||||
}
|
}
|
||||||
newImg.DrawTriangles(srcs, offsets, vs, is, affine.ColorMIdentity{}, graphicsdriver.CompositeModeCopy, graphicsdriver.FilterNearest, graphicsdriver.AddressUnsafe, dr, graphicsdriver.Region{}, nil, nil, false)
|
newImg.DrawTriangles(srcs, offsets, vs, is, affine.ColorMIdentity{}, graphicsdriver.CompositeModeCopy, graphicsdriver.FilterNearest, graphicsdriver.AddressUnsafe, dr, graphicsdriver.Region{}, nil, nil, false)
|
||||||
|
|
||||||
// Overwrite the history as if the image newImg is created only by WritePixels. Now drawTrianglesHistory
|
// Overwrite the history as if the image newImg is created only by WritePixels.
|
||||||
// and basePixels cannot be mixed.
|
|
||||||
newImg.clearDrawTrianglesHistory()
|
newImg.clearDrawTrianglesHistory()
|
||||||
newImg.basePixels = i.basePixels
|
newImg.basePixels = i.basePixels
|
||||||
newImg.stale = i.stale
|
newImg.stale = i.stale
|
||||||
@ -336,7 +335,7 @@ func (i *Image) WritePixels(pixels []byte, x, y, width, height int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// drawTrianglesHistory and basePixels cannot be mixed.
|
// Records for DrawTriangles cannot come after records for WritePixels.
|
||||||
if len(i.drawTrianglesHistory) > 0 {
|
if len(i.drawTrianglesHistory) > 0 {
|
||||||
i.makeStale(image.Rect(0, 0, i.width, i.height))
|
i.makeStale(image.Rect(0, 0, i.width, i.height))
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user