mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Refactoring
This commit is contained in:
parent
93c31654da
commit
847a8b4d53
@ -14,14 +14,14 @@
|
|||||||
|
|
||||||
package graphics
|
package graphics
|
||||||
|
|
||||||
|
// InternalImageSize returns a nearest appropriate size as an internal image.
|
||||||
|
func InternalImageSize(x int) int {
|
||||||
// minInternalImageSize is the minimum size of internal images (texture/framebuffer).
|
// minInternalImageSize is the minimum size of internal images (texture/framebuffer).
|
||||||
//
|
//
|
||||||
// For example, the image size less than 15 is not supported on some iOS devices.
|
// For example, the image size less than 15 is not supported on some iOS devices.
|
||||||
// See also: https://stackoverflow.com/questions/15935651
|
// See also: https://stackoverflow.com/questions/15935651
|
||||||
const minInternalImageSize = 16
|
const minInternalImageSize = 16
|
||||||
|
|
||||||
// InternalImageSize returns a nearest appropriate size as an internal image.
|
|
||||||
func InternalImageSize(x int) int {
|
|
||||||
if x <= 0 {
|
if x <= 0 {
|
||||||
panic("graphics: x must be positive")
|
panic("graphics: x must be positive")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user