From 6e418539a6fc989264eb936821213b5cbdf64b81 Mon Sep 17 00:00:00 2001 From: Igor Timofeev Date: Sat, 29 Aug 2015 22:02:14 +0300 Subject: [PATCH] Update ECSAPI.lua --- lib/ECSAPI.lua | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lib/ECSAPI.lua b/lib/ECSAPI.lua index 1689c758..120e0ddd 100644 --- a/lib/ECSAPI.lua +++ b/lib/ECSAPI.lua @@ -7,6 +7,7 @@ local shell = require("shell") local keyboard = require("keyboard") local computer = require("computer") local fs = require("filesystem") +local image = require("image") --local thread = require("thread") local gpu = component.gpu local screen = component.screen @@ -316,20 +317,7 @@ end --НАРИСОВАТЬ ЗАПОМНЕННЫЕ ПИКСЕЛИ ИЗ МАССИВА function ECSAPI.drawOldPixels(oldPixels) - for j=1,#oldPixels do - for i=1,#oldPixels[j] do - - if oldPixels[j][i][4] ~= gpu.getForeground() then - gpu.setForeground(oldPixels[j][i][4]) - end - - if oldPixels[j][i][5] ~= gpu.getBackground() then - gpu.setBackground(oldPixels[j][i][5]) - end - - gpu.set(oldPixels[j][i][1], oldPixels[j][i][2], oldPixels[j][i][3]) - end - end + image.drawPNG(1, 1, image.convertImagetoGroupedImage(oldPixels)) end --ОГРАНИЧЕНИЕ ДЛИНЫ СТРОКИ