mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
restorable: Add comments
This commit is contained in:
parent
80940f9070
commit
2881d3fc4c
@ -93,6 +93,8 @@ func NewImage(width, height int, filter opengl.Filter, volatile bool) *Image {
|
||||
}
|
||||
|
||||
// NewImageFromImage creates an image with source image.
|
||||
//
|
||||
// width/height might be different from source's size.
|
||||
func NewImageFromImage(source *image.RGBA, width, height int, filter opengl.Filter) *Image {
|
||||
w2, h2 := math.NextPowerOf2Int(width), math.NextPowerOf2Int(height)
|
||||
p := make([]uint8, 4*w2*h2)
|
||||
|
Loading…
Reference in New Issue
Block a user