diff --git a/graphicscontext.go b/graphicscontext.go index 55d16c11e..510cec4cc 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -54,7 +54,7 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo if c.offscreen != nil { _ = c.offscreen.Dispose() } - c.offscreen = newVolatileImage(screenWidth, screenHeight, FilterDefault) + c.offscreen = newVolatileImage(screenWidth, screenHeight) w := int(float64(screenWidth) * screenScale) h := int(float64(screenHeight) * screenScale) diff --git a/image.go b/image.go index b9a5bb326..0b094d8e8 100644 --- a/image.go +++ b/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. // // 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{ shareableImage: shareable.NewVolatileImage(width, height), - filter: filter, + filter: FilterDefault, } i.addr = i runtime.SetFinalizer(i, (*Image).Dispose)