Class ScaleEffect

java.lang.Object
com.github.tommyettinger.textra.Effect
com.github.tommyettinger.textra.effects.ScaleEffect

public class ScaleEffect extends Effect
Permanently sets the size of text. Doesn't change over time.
Parameters: sizeX;sizeY
The sizeX is multiplied with the width of a cell. If sizeY is not specified, this is multiplied with the height of a cell as well. Defaults to 1.0 . The sizeY is multiplied with the height of a cell. If sizeY is present, then sizeX only affects width. Defaults to 2.0 .
Example usage: {SCALE=1.5}Makes glyphs 1.5x wider and 1.5x taller.{ENDSCALE} {SCALE=2;1}Makes glyphs 2x wider and their normal height.{ENDSCALE}
  • Constructor Details

  • Method Details

    • onApply

      protected void onApply(long glyph, int localIndex, int globalIndex, float delta)
      Description copied from class: Effect
      Called when this effect should be applied to the given glyph.
      Specified by:
      onApply in class Effect