您好!
使用Lua和Love2d,我想用像素调整图像的大小:
img = love.graphics.newImage("assets/bg.png")
-- resize the image (500 x 400)
function love.draw()
love.graphics.draw(bg, 0, 0)
end发布于 2020-04-30 22:09:55
我所理解的是,你想要以像素风格缩放图像,并且你不想要这种模糊效果,你可以在使用love.graphics.newImage(路径)加载图像之前将默认过滤器设置为最近:
love.graphics.setDefaultFilter("nearest", "nearest")
love.graphics.newImage(path)
love.graphics.setDefaultFilter("linear", "linear") --[[ If you want to let the filter like before ]]我建议你访问love2d论坛。如果这不起作用,请访问this forum
https://stackoverflow.com/questions/61348737
复制相似问题