java.lang.Object
com.pixelmonmod.api.client.screen.render.Drawing

public class Drawing extends Object
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.
  • Method Details

    • text

      public static void text(Font<? extends StatefulWidget<?>> font)
    • text

      public static void text(float yOverride, Font<? extends StatefulWidget<?>> font)
    • nineslice

      public static void nineslice(WidgetRenderState<? extends StatefulWidget<?>> state, NineSlice ns, Color color)
    • nineslice

      public static void nineslice(net.minecraft.client.gui.GuiGraphics graphics, NineSlice ns, float x, float y, float z, float w, float h, Color color)
    • rect

      public static void rect(WidgetRenderState<? extends StatefulWidget<?>> state, Color color)
    • 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)
    • triangle

      public static void triangle(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, Color dark)
    • ribbon

      public static void ribbon(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, Color dark, Color light, Color shadow)
    • barRibbon

      public static void barRibbon(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, float accent, float acuteness, Color mainColor, Color accentColor)
    • bar

      public static void bar(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, float accent, float acuteness, Color mainColor, Color accentColor)
    • drawLeftFacingArrow

      public static void drawLeftFacingArrow(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, Color mainColor)
    • drawRightFacingArrow

      public static void drawRightFacingArrow(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, Color mainColor)
    • drawUpwardFacingArrow

      public static void drawUpwardFacingArrow(net.minecraft.client.gui.GuiGraphics graphics, float x, float y, float width, float height, Color mainColor)
    • 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)