Module flower.Label

Label for text display.

Based on MOAITextBox.

Extends:

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

Label:init (text, width, height, font, textSize) Constructor.
Label:setSize (width, height) Sets the size.
Label:setTextSize (points, dpi) Sets the text size.
Label:setTextScale (scale) Sets the text scale.
Label:setHighQuality (enabled, contentScale) Sets the high quality of the drawing of the string.
Label:setFont (font) Set the font.
Label:fitSize (length, maxWidth, maxHeight, padding) Sets the fit size.
Label:fitHeight (length, maxHeight, padding) Sets the fit height.
Label:fitWidth (length, maxWidth, padding) Sets the fit height.


Functions

Label:init (text, width, height, font, textSize)
Constructor.

Parameters:

  • text Text
  • width (option)Width
  • height (option)Height
  • font (option) ont path, or Font object
  • textSize (option) TextSize
Label:setSize (width, height)
Sets the size.

Parameters:

  • width Width
  • height Height
Label:setTextSize (points, dpi)
Sets the text size.

Parameters:

  • points points
  • dpi (Option)dpi
Label:setTextScale (scale)
Sets the text scale.

Parameters:

  • scale scale
Label:setHighQuality (enabled, contentScale)
Sets the high quality of the drawing of the string. This setting is meaningful when the scale of the Viewport does not match the screen.

Parameters:

  • enabled Set true to the high quality
  • contentScale (Option)Scale of the Viewport, which label is displayed.
Label:setFont (font)
Set the font.

Parameters:

  • font font or font path.
Label:fitSize (length, maxWidth, maxHeight, padding)
Sets the fit size.

Parameters:

  • length (Option)Length of the text.
  • maxWidth (Option)maxWidth of the text.
  • maxHeight (Option)maxHeight of the text.
  • padding (Option)padding of the text.
Label:fitHeight (length, maxHeight, padding)
Sets the fit height.

Parameters:

  • length (Option)Length of the text.
  • maxHeight (Option)maxHeight of the text.
  • padding (Option)padding of the text.
Label:fitWidth (length, maxWidth, padding)
Sets the fit height.

Parameters:

  • length (Option)Length of the text.
  • maxWidth (Option)maxWidth of the text.
  • padding (Option)padding of the text.
generated by LDoc 1.3