TextDrawable

Text image drawable. Resource file extension: .tim Image format is JSON based. Sample: { text: [ "╔═╗", "║ ║", "╚═╝"], backgroundColor: [0x000080], textColor: [0xFF0000], ninepatch: [1,1,1,1] }

Short form:

{'╔═╗' '║ ║' '╚═╝' bc 0x000080 tc 0xFF0000 ninepatch 1 1 1 1}

Constructors

this
this(int dx, int dy, dstring text, uint textColor, uint bgColor)
Undocumented in source.
this
this(string src)
Undocumented in source.
this
this(dstring src)

Create from text drawable source file format: { text: "text line 1" "text line 2" "text line 3" backgroundColor: 0xFFFFFF [,0xFFFFFF]* textColor: 0x000000, [,0x000000]* ninepatch: left,top,right,bottom padding: left,top,right,bottom }

Members

Functions

drawChar
void drawChar(ConsoleDrawBuf buf, int srcx, int srcy, int dstx, int dsty)
Undocumented in source. Be warned that the author may not have intended to support it.
drawTo
void drawTo(DrawBuf drawbuf, Rect rc, uint state, int tilex0, int tiley0)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

height
int height [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
padding
Rect padding [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
width
int width [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Drawable

_instanceCount
int _instanceCount;
Undocumented in source.
instanceCount
int instanceCount [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
~this
~this()
Undocumented in source.
drawTo
void drawTo(DrawBuf buf, Rect rc, uint state, int tilex0, int tiley0)
Undocumented in source.
width
int width [@property getter]
Undocumented in source.
height
int height [@property getter]
Undocumented in source.
padding
Rect padding [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta