TextWrap

About TextWrap

Type: Gideros class
License: BSD License
Supported platforms:

       

Categories:
  • Text Processing

Gideros TextWrap object splits string into multiple lines by provided width.

You can also specify line spacing and alignment modes : left, right, center and justify.

And it is completely compatible with existing TextField object methods.

Package contains TextWrap.lua and example Gideros application project.

Code example:

--limiting text by aproximately 250px
local text = TextWrap.new("String to limit and split in lines", 250, "justify")
text:setLineSpacing(5)
text:setPosition(10,10)
text:setTextColor(0xff0000)
stage:addChild(text)
				

TextWrap video