@Environment(value=CLIENT) class TextRenderer.Drawer extends Object implements CharacterVisitor
Modifier and Type | Field and Description |
---|---|
private float |
alpha |
private float |
blue |
private float |
brightnessMultiplier |
private float |
green |
private int |
light |
private Matrix4f |
matrix |
private List<GlyphRenderer.Rectangle> |
rectangles |
private float |
red |
private boolean |
seeThrough |
private boolean |
shadow |
(package private) VertexConsumerProvider |
vertexConsumers |
private float |
x |
private float |
y |
Constructor and Description |
---|
Drawer(VertexConsumerProvider vertexConsumers,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
boolean seeThrough,
int light) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(int index,
Style style,
int codePoint)
Visits a single character.
|
private void |
addRectangle(GlyphRenderer.Rectangle rectangle) |
float |
drawLayer(int underlineColor,
float x) |
final VertexConsumerProvider vertexConsumers
private final boolean shadow
private final float brightnessMultiplier
private final float red
private final float green
private final float blue
private final float alpha
private final Matrix4f matrix
private final boolean seeThrough
private final int light
private float x
private float y
@Nullable private List<GlyphRenderer.Rectangle> rectangles
public Drawer(VertexConsumerProvider vertexConsumers, float x, float y, int color, boolean shadow, Matrix4f matrix, boolean seeThrough, int light)
private void addRectangle(GlyphRenderer.Rectangle rectangle)
public boolean accept(int index, Style style, int codePoint)
Multiple surrogate characters are converted into one single codePoint
when passed into this method.
accept
in interface CharacterVisitor
index
- the current index of the characterstyle
- the style of the character, containing formatting and font informationcodePoint
- the code point of the charactertrue
to continue visiting other characters, or false
to terminate the visitpublic float drawLayer(int underlineColor, float x)