-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextEx.lua
More file actions
24 lines (18 loc) · 920 Bytes
/
textEx.lua
File metadata and controls
24 lines (18 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---Exemplo de uso do modulo <b>Text</b>.
-- Este exemplo alinha o texto em formato justificado.<br><br>
--Este modulo possui funcionamento instavel se comparado aso demais, precisando ainda de
-- mais testes e correcao de possiveis erros.
module('examples.textEx', package.seeall);
local text = require'athus.view.text'
local eng = require'athus.core.engine'
t = text.Text:new('teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste teste ',420,98);
t:attrColor('white');
t:attrHAlign('justify');
t:attrSize(18);
t:attrStyle('bold');
t:draw();
t:setPosition({12,12});
e = eng.Engine:new();
e:clean();
e:buffer(t);
e:refresh();