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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbarRibbon(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, float accent, float acuteness, Color mainColor, Color accentColor) static voidcircle(WidgetRenderState<? extends StatefulWidget<?>> state, int smoothness, Color color) static voidcircle(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double radius, int smoothness, Color color) static voidcircle(net.minecraft.client.gui.GuiGraphics graphics, ScreenVector position, ScreenVector size, int smoothness, Color color) static voiddraw(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.renderer.RenderType renderType, Consumer<Drawing.PrimitiveDrawingContext> drawing) static voiddrawLines(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static voiddrawQuads(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static voiddrawTriangles(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static voiddrawTrianglesFXAA(net.minecraft.client.gui.GuiGraphics graphics, Consumer<Drawing.PrimitiveDrawingContext> drawing) static voidnineslice(WidgetRenderState<? extends StatefulWidget<?>> state, NineSlice ns, Color color) static voidnineslice(net.minecraft.client.gui.GuiGraphics graphics, NineSlice ns, float x, float y, float z, float w, float h, Color color) static voidrect(WidgetRenderState<? extends StatefulWidget<?>> state, Color color) static voidrect(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double w, double h, Color color) static voidrect(net.minecraft.client.gui.GuiGraphics guiGraphics, ScreenVector position, ScreenVector size, Color color) static voidribbon(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, Color dark, Color light, Color shadow) static voidsmoothrect(WidgetRenderState<? extends StatefulWidget<?>> state, double radius, int smoothness, Color color) static voidsmoothrect(net.minecraft.client.gui.GuiGraphics graphics, double x, double y, double z, double w, double h, double radius, int smoothness, Color color) static voidsmoothrect(net.minecraft.client.gui.GuiGraphics graphics, ScreenVector position, ScreenVector size, double radius, int smoothness, Color color) static voidtext(float yOverride, Font<? extends StatefulWidget<?>> font) static voidtext(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)
-