Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------
- -- Programm: LAPIShell --
- -- Author: JaggerDer --
- -- Created: --.--.14 --
- ----------------------------
- DrawLine = function(anX1, anY1, anX2, anY2, asChar, anCharColor, anColor, aloLayer)
- local _nx1 = anX1
- local _ny1 = anY1
- local _nx2 = anX2
- local _ny2 = anY2
- local _nSteep = math.abs(anY2 - anY1) > math.abs(anX2 - anX1)
- if (_nSteep) then
- _nx1 = anY1
- _ny1 = anX1
- _nx2 = anY2
- _ny2 = anX2
- end
- if (_nx1 > _nx2) then
- _nx1 = anX2
- _nx2 = anX1
- _ny1 = anY2
- _ny2 = anY1
- end
- local _ndx = _nx2 - _nx1
- local _ndy = math.abs(_ny2 - _ny1)
- local _nerr = _ndx / 2
- local _nystep = -1
- if (_ny1 < _ny2) then _nystep = 1 end
- local _ny = _ny1
- local _nx = _nx1
- while (_nx < _nx2) do
- aloLayer:SetPixel(_nx, _ny, asChar, anCharColor, anColor)
- _nerr = _nerr - _ndy
- if (_nerr < 0) then
- _ny = _ny + _nystep
- _nerr = _nerr + _ndx
- end
- _nx = _nx + 1
- end
- end
- DrawBox = function(anX1, anY1, anX2, anY2, asChar, anCharColor, anColor, aloLayer)
- for y = anY1, anY2, 1 do
- for x = anX1, anX2, 1 do
- aloLayer:SetPixel(x, y, asChar, anCharColor, anColor)
- end
- end
- end
- DrawCircle = function(anX, anY, anR, asText, anTextColor, anColor, anLayerName)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement