diff options
author | piernov <piernov@piernov.org> | 2014-05-12 13:01:00 +0200 |
---|---|---|
committer | piernov <piernov@piernov.org> | 2014-05-12 13:01:00 +0200 |
commit | 1d27bfb91b0ed1b328caa80dbf8e87358f212ea4 (patch) | |
tree | 0cd41e48e3bb07f62402f55e5c87575869697a4c | |
parent | 1fe07b8aace16fc3b4d933d16333de2bad7a0d11 (diff) | |
download | love2d-fakecanvas-master.tar.gz love2d-fakecanvas-master.tar.bz2 love2d-fakecanvas-master.tar.xz love2d-fakecanvas-master.zip |
-rw-r--r-- | fakecanvas.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fakecanvas.lua b/fakecanvas.lua index e5cb7b4..77466a2 100644 --- a/fakecanvas.lua +++ b/fakecanvas.lua @@ -111,8 +111,8 @@ local function Canvas (width, height) w = math.min(sw, tonumber(width) or sw) h = math.min(sh, tonumber(height) or sh) else -- well that sucks - w = math.min(prevpo2(sw), nextpo2(tonumber(width) or 1)) - h = math.min(prevpo2(sh), nextpo2(tonumber(height) or 1)) + w = math.max(prevpo2(sw), nextpo2(tonumber(width) or 1)) + h = math.max(prevpo2(sh), nextpo2(tonumber(height) or 1)) end c._imagedata = love.image.newImageData(w, h) |