mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
graphics: Remove 'filter' argument from newVolatileImage (#503)
This commit is contained in:
parent
2f7cd00d2c
commit
c62e63f874
@ -54,7 +54,7 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo
|
|||||||
if c.offscreen != nil {
|
if c.offscreen != nil {
|
||||||
_ = c.offscreen.Dispose()
|
_ = c.offscreen.Dispose()
|
||||||
}
|
}
|
||||||
c.offscreen = newVolatileImage(screenWidth, screenHeight, FilterDefault)
|
c.offscreen = newVolatileImage(screenWidth, screenHeight)
|
||||||
|
|
||||||
w := int(float64(screenWidth) * screenScale)
|
w := int(float64(screenWidth) * screenScale)
|
||||||
h := int(float64(screenHeight) * screenScale)
|
h := int(float64(screenHeight) * screenScale)
|
||||||
|
4
image.go
4
image.go
@ -373,10 +373,10 @@ func NewImage(width, height int, filter Filter) (*Image, error) {
|
|||||||
// If width or height is less than 1 or more than device-dependent maximum size, newVolatileImage panics.
|
// If width or height is less than 1 or more than device-dependent maximum size, newVolatileImage panics.
|
||||||
//
|
//
|
||||||
// Error returned by newVolatileImage is always nil as of 1.5.0-alpha.
|
// Error returned by newVolatileImage is always nil as of 1.5.0-alpha.
|
||||||
func newVolatileImage(width, height int, filter Filter) *Image {
|
func newVolatileImage(width, height int) *Image {
|
||||||
i := &Image{
|
i := &Image{
|
||||||
shareableImage: shareable.NewVolatileImage(width, height),
|
shareableImage: shareable.NewVolatileImage(width, height),
|
||||||
filter: filter,
|
filter: FilterDefault,
|
||||||
}
|
}
|
||||||
i.addr = i
|
i.addr = i
|
||||||
runtime.SetFinalizer(i, (*Image).Dispose)
|
runtime.SetFinalizer(i, (*Image).Dispose)
|
||||||
|
Loading…
Reference in New Issue
Block a user