graphicsdriver/monogame: Bug fix: Wrong viewport values

This commit is contained in:
Hajime Hoshi 2020-04-11 18:54:08 +09:00
parent 8b78855462
commit d0115f61ae

View File

@ -18,6 +18,7 @@ package monogame
import (
"github.com/hajimehoshi/ebiten/internal/driver"
"github.com/hajimehoshi/ebiten/internal/graphics"
)
type RenderTarget2D interface {
@ -48,7 +49,8 @@ func (*Image) Pixels() ([]byte, error) {
}
func (i *Image) SetAsDestination() {
i.v.SetAsDestination(i.width, i.height)
w, h := graphics.InternalImageSize(i.width), graphics.InternalImageSize(i.height)
i.v.SetAsDestination(w, h)
}
func (i *Image) SetAsSource() {