neft
Version:
JavaScript. Everywhere.
88 lines (66 loc) • 6.24 kB
Markdown
> [Wiki](Home) ▸ [[API Reference|API-Reference]] ▸ [[Renderer|Renderer-API]] ▸ [[Item|Renderer-Item-API]] ▸ **Text**
# Text
```javascript
Text {
font.pixelSize: 30
font.family: 'monospace'
text: '<strong>Neft</strong> Renderer'
color: 'blue'
}
```
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#text)
## Nested APIs
* [[Text.Font|Renderer-Item.Text.Font-API]]
## Table of contents
* [Text](#text)
* [**Class** Text](#class-text)
* [New](#new)
* [width](#width)
* [height](#height)
* [text](#text)
* [color](#color)
* [linkColor](#linkcolor)
* [lineHeight](#lineheight)
* [contentWidth](#contentwidth)
* [contentHeight](#contentheight)
* [alignment](#alignment)
* [font](#font)
* [Glossary](#glossary)
#**Class** Text
<dl><dt>Syntax</dt><dd><code>**Class** Text : *Item*</code></dd><dt>Extends</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Item-API#class-item">Item</a></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#class-text)
##New
<dl><dt>Syntax</dt><dd><code>*Text* Text.New([*Component* component, *Object* options])</code></dd><dt>Static method of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Parameters</dt><dd><ul><li>component — <i>Component</i> — <i>optional</i></li><li>options — <a href="/Neft-io/neft/wiki/Utils-API#isobject">Object</a> — <i>optional</i></li></ul></dd><dt>Returns</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#new)
##width
<dl><dt>Syntax</dt><dd><code>*Float* Text::width = `-1`</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Utils-API#isfloat">Float</a></dd><dt>Default</dt><dd><code>-1</code></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#width)
##height
<dl><dt>Syntax</dt><dd><code>*Float* Text::height = `-1`</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Utils-API#isfloat">Float</a></dd><dt>Default</dt><dd><code>-1</code></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#height)
##text
<dl><dt>Syntax</dt><dd><code>*String* Text::text</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><i>String</i></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#text)
##color
<dl><dt>Syntax</dt><dd><code>*String* Text::color = `'black'`</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><i>String</i></dd><dt>Default</dt><dd><code>'black'</code></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#color)
##linkColor
<dl><dt>Syntax</dt><dd><code>*String* Text::linkColor = `'blue'`</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><i>String</i></dd><dt>Default</dt><dd><code>'blue'</code></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#linkcolor)
##lineHeight
<dl><dt>Syntax</dt><dd><code>Hidden *Float* Text::lineHeight = `1`</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Utils-API#isfloat">Float</a></dd><dt>Default</dt><dd><code>1</code></dd><dt>Not Implemented</dt></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#lineheight)
##contentWidth
<dl><dt>Syntax</dt><dd><code>ReadOnly *Float* Text::contentWidth</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Utils-API#isfloat">Float</a></dd><dt>Read Only</dt></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#contentwidth)
##contentHeight
<dl><dt>Syntax</dt><dd><code>ReadOnly *Float* Text::contentHeight</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Utils-API#isfloat">Float</a></dd><dt>Read Only</dt></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#contentheight)
##alignment
<dl><dt>Syntax</dt><dd><code>*Item.Alignment* Text::alignment</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Item.Alignment-API#class-alignment">Item.Alignment</a></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#alignment)
##font
<dl><dt>Syntax</dt><dd><code>*Item.Text.Font* Text::font</code></dd><dt>Prototype property of</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Text-API#class-text">Text</a></dd><dt>Type</dt><dd><a href="/Neft-io/neft/wiki/Renderer-Item.Text.Font-API#class-font">Item.Text.Font</a></dd></dl>
> [`Source`](/Neft-io/neft/blob/65f8de73ffc0dbb38be0f58144f629599500b1a9/src/renderer/types/basics/item/types/text.litcoffee#font)
# Glossary
- [Text](#class-text)