Package icyllis.modernui.graphics.text

# Class LayoutUtils

java.lang.Object
icyllis.modernui.graphics.text.LayoutUtils

public class LayoutUtils extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LayoutUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `getNextWordBreakForCache(char[] buf, int start, int end, int offset)`
  Return offset of next word break.
  `static int`
  `getPrevWordBreakForCache(char[] buf, int start, int end, int offset)`
  Return offset of previous word break.
  `static boolean`
  `isStretchableSpace(char c)`
  `static boolean`
  `isWordBreakAfter(char c)`
  For the purpose of layout, a word break is a boundary with no kerning or complex script processing.
  `static boolean`
  `isWordBreakBefore(char c)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LayoutUtils

    public LayoutUtils()

- ## Method Details

  - ### isStretchableSpace

    public static boolean isStretchableSpace(char c)

  - ### isWordBreakAfter

    public static boolean isWordBreakAfter(char c)
    For the purpose of layout, a word break is a boundary with no kerning or complex script processing. This is necessarily a heuristic, but should be accurate most of the time.

  - ### isWordBreakBefore

    public static boolean isWordBreakBefore(char c)

  - ### getPrevWordBreakForCache

    public static int getPrevWordBreakForCache(char[] buf, int start, int end, int offset)
    Return offset of previous word break. It is either invalid input: '<' offset or == start.

  - ### getNextWordBreakForCache

    public static int getNextWordBreakForCache(char[] buf, int start, int end, int offset)
    Return offset of next word break. It is either > offset or == end.