Class Drawing
java.lang.Object
com.pixelmonmod.api.client.screen.render.Drawing
Methods for drawing.
Some of these are taken from
ScreenHelper
, but use various render state wrappers for reducing the overall
number of required args. The render state wrappers are singletons - only one instance of them ever exists, the fields
are just updated when needed. This avoids constant object instantiation and GC overhead implications.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
barRibbon
(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, float accent, float acuteness, Color mainColor, Color accentColor) static void
circle
(WidgetRenderState<? extends StatefulWidget<?>> state, int smoothness, Color color) static void
circle
(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double radius, int smoothness, Color color) static void
circle
(net.minecraft.client.gui.GuiGraphics graphics, ScreenVector position, ScreenVector size, int smoothness, Color color) static void
draw
(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.renderer.RenderType renderType, Consumer<Drawing.PrimitiveDrawingContext> drawing) static void
drawLines
(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static void
drawQuads
(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static void
drawTriangles
(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static void
drawTrianglesFXAA
(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static void
nineslice
(WidgetRenderState<? extends StatefulWidget<?>> state, NineSlice ns, Color color) static void
nineslice
(net.minecraft.client.gui.GuiGraphics graphics, NineSlice ns, float x, float y, float z, float w, float h, Color color) static void
rect
(WidgetRenderState<? extends StatefulWidget<?>> state, Color color) static void
rect
(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double w, double h, Color color) static void
rect
(net.minecraft.client.gui.GuiGraphics guiGraphics, ScreenVector position, ScreenVector size, Color color) static void
ribbon
(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, Color dark, Color light, Color shadow) static void
smoothrect
(WidgetRenderState<? extends StatefulWidget<?>> state, double radius, int smoothness, Color color) static void
smoothrect
(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double w, double h, double radius, int smoothness, Color color) static void
smoothrect
(net.minecraft.client.gui.GuiGraphics graphics, ScreenVector position, ScreenVector size, double radius, int smoothness, Color color) static void
text
(float yOverride, Font<? extends StatefulWidget<?>> font) static void
text
(Font<? extends StatefulWidget<?>> font)
-
Method Details
-
text
-
text
-
nineslice
public static void nineslice(WidgetRenderState<? extends StatefulWidget<?>> state, NineSlice ns, Color color) -
nineslice
-
rect
-
rect
public static void rect(net.minecraft.client.gui.GuiGraphics guiGraphics, ScreenVector position, ScreenVector size, Color color) -
rect
public static void rect(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double w, double h, Color color) -
circle
public static void circle(WidgetRenderState<? extends StatefulWidget<?>> state, int smoothness, Color color) -
circle
public static void circle(net.minecraft.client.gui.GuiGraphics graphics, ScreenVector position, ScreenVector size, int smoothness, Color color) -
circle
public static void circle(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double radius, int smoothness, Color color) -
smoothrect
public static void smoothrect(WidgetRenderState<? extends StatefulWidget<?>> state, double radius, int smoothness, Color color) -
smoothrect
public static void smoothrect(net.minecraft.client.gui.GuiGraphics graphics, ScreenVector position, ScreenVector size, double radius, int smoothness, Color color) -
smoothrect
public static void smoothrect(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double w, double h, double radius, int smoothness, Color color) -
ribbon
-
barRibbon
-
drawQuads
public static void drawQuads(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) -
drawTriangles
public static void drawTriangles(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) -
drawTrianglesFXAA
public static void drawTrianglesFXAA(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) -
drawLines
public static void drawLines(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) -
draw
public static void draw(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.renderer.RenderType renderType, Consumer<Drawing.PrimitiveDrawingContext> drawing)
-