1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-09-27 14:48:21 +00:00

Update ccbn.lua

This commit is contained in:
LDDestroier 2019-03-09 17:32:49 -05:00 committed by GitHub
parent b893214b16
commit eadcae3482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,6 @@ local stage = {
-- ripped from NFTE
local getSize = function(image)
assert(checkValid(image), "Invalid image.")
local x, y = 0, #image[1]
for y = 1, #image[1] do
x = math.max(x, #image[1][y])
@ -46,11 +45,8 @@ local makeRectangle = function(width, height, char, text, back)
return output
end
local stretchImage = function(_image, sx, sy, noRepeat)
assert(checkValid(_image), "Invalid image.")
local output = {{},{},{}}
local image = deepCopy(_image)
if sx < 0 then image = flipX(image) end
if sy < 0 then image = flipY(image) end
sx, sy = math.abs(sx), math.abs(sy)
local imageX, imageY = getSize(image)
local tx, ty