public final class ItalicSegment extends TextSegment
| Constructor and Description |
|---|
ItalicSegment(Segment parent,
java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
computeWrapIndent(net.minecraft.client.font.TextRenderer renderer) |
protected java.lang.String |
format() |
protected boolean |
ignoreLeadingWhitespace() |
protected static int |
indexOfFirstNonWhitespace(java.lang.String s) |
protected int |
maxChars(java.lang.String s,
int maxWidth,
int maxLineWidth,
net.minecraft.client.font.TextRenderer renderer) |
Segment |
next()
Set after construction of document, used for formatting, specifically
to compute the height for last segment on a line (to force a new line).
|
int |
nextX(int indent,
int maxWidth,
net.minecraft.client.font.TextRenderer renderer)
Get the X coordinate at which to render the next segment.
|
int |
nextY(int indent,
int maxWidth,
net.minecraft.client.font.TextRenderer renderer)
Get the Y coordinate at which to render the next segment.
|
Segment |
root()
The root segment, i.e.
|
void |
setNext(Segment segment) |
java.lang.String |
toString() |
color, lineHeight, parent, refine, render, scale, stringWidth, textpublic ItalicSegment(Segment parent, java.lang.String text)
protected java.lang.String format()
format in class TextSegmentpublic java.lang.String toString()
public int nextX(int indent,
int maxWidth,
net.minecraft.client.font.TextRenderer renderer)
SegmentFor flowing/inline segments this will be to the right of the last line this segment renders, for block segments it will be at the start of the next line below this segment.
The coordinates in this context are relative to (0,0).
public int nextY(int indent,
int maxWidth,
net.minecraft.client.font.TextRenderer renderer)
SegmentFor flowing/inline segments this will be the same level as the last line this segment renders, unless it's the last segment on its line. For block segments and last-on-line segments this will be the next line after.
The coordinates in this context are relative to (0,0).
protected boolean ignoreLeadingWhitespace()
protected int maxChars(java.lang.String s,
int maxWidth,
int maxLineWidth,
net.minecraft.client.font.TextRenderer renderer)
protected int computeWrapIndent(net.minecraft.client.font.TextRenderer renderer)
protected static int indexOfFirstNonWhitespace(java.lang.String s)
public Segment root()
Segmentpublic Segment next()
Segment