mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Add support for partial Image updates via Image:replacePixels(imagedata [, sliceindex, mipmap, x, y]) with a smaller-sized ImageData.
Also updated the argument order of Canvas:newImageData to match: (sliceindex, mipmap, x, y, w, h).
This commit is contained in:
@@ -133,10 +133,7 @@ void Image::loadData()
|
||||
love::image::ImageDataBase *id = data.get(slice, mip);
|
||||
|
||||
if (id != nullptr)
|
||||
{
|
||||
Rect r = {0, 0, id->getWidth(), id->getHeight()};
|
||||
uploadImageData(id, mip, slice, r);
|
||||
}
|
||||
uploadImageData(id, mip, slice, 0, 0);
|
||||
}
|
||||
|
||||
w = std::max(w / 2, 1);
|
||||
|
||||
Reference in New Issue
Block a user