Package dev.boze.api.render
Interface DrawerText
public interface DrawerText
DrawerText
Draws text
-
Method Summary
Modifier and TypeMethodDescriptiondefault double
Draw textdouble
Draw textdefault double
Get the height of the text without a shadowdouble
getHeight
(boolean shadow) Get the height of the textdefault double
Get the width of the text without a shadowdouble
Get the width of the textvoid
startDrawing
(double size) Start drawingvoid
startSizing
(double size) Start sizing Lets you use the width and height methods, without rendering the textdefault void
Stop drawingvoid
stopDrawing
(net.minecraft.client.gui.DrawContext context) Stop drawingvoid
Stop sizing
-
Method Details
-
startDrawing
void startDrawing(double size) Start drawing- Parameters:
size
- size of the text
-
stopDrawing
void stopDrawing(net.minecraft.client.gui.DrawContext context) Stop drawing- Parameters:
context
- DrawContext to use for rendering, can be null
-
stopDrawing
default void stopDrawing()Stop drawing -
draw
Draw text- Parameters:
text
- text to renderx
- x positiony
- y positioncolor
- color of the textshadow
- if the text should have a shadow- Returns:
- the width of the text
-
draw
Draw text- Parameters:
text
- text to renderx
- x positiony
- y positioncolor
- color of the text- Returns:
- the width of the text
-
startSizing
void startSizing(double size) Start sizing Lets you use the width and height methods, without rendering the text- Parameters:
size
- size of the text
-
stopSizing
void stopSizing()Stop sizing -
getWidth
Get the width of the text- Parameters:
text
- text to get the width ofshadow
- if the text has a shadow- Returns:
- the width of the text
-
getWidth
Get the width of the text without a shadow- Parameters:
text
- text to get the width of- Returns:
- the width of the text
-
getHeight
double getHeight(boolean shadow) Get the height of the text- Parameters:
shadow
- if the text has a shadow- Returns:
- the height of the text
-
getHeight
default double getHeight()Get the height of the text without a shadow- Returns:
- the height of the text
-