Package icyllis.modernui.graphics.text
Class LayoutUtils
java.lang.Object
icyllis.modernui.graphics.text.LayoutUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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)
-
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.
-