java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.utils.RenderUtils

public final class RenderUtils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static net.minecraft.client.renderer.Rect2i
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    blitInscribed(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight)
     
    static void
    blitInscribed(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight, boolean centerX, boolean centerY)
     
    static void
    blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, NineSliceInfo.TextureInfo texture, int x, int y, int width, int height, NineSliceInfo.SliceBounds slices, NineSliceInfo.TextureRegion region)
     
    static void
    blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, net.minecraft.resources.ResourceLocation texture, int x, int y, int width, int height, int sliceSize, int textureWidth, int textureHeight)
     
    static void
    blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, net.minecraft.resources.ResourceLocation texture, int x, int y, int width, int height, int sliceWidth, int sliceHeight, int textureWidth, int textureHeight)
     
    static void
    blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, net.minecraft.resources.ResourceLocation texture, int x, int y, int width, int height, int sliceLeft, int sliceTop, int sliceRight, int sliceBottom, int textureWidth, int textureHeight)
     
    static void
    blitRepeating(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation atlas, int x, int y, int width, int height, int u, int v, int texW, int texH, int fullTexW, int fullTexH)
    Draws a texture section repeatedly to fill a rectangular area.
    static void
    blitWithBorder(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int border)
     
    static void
    blitWithBorder(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder)
     
    static net.minecraft.client.renderer.Rect2i
    createRect2i(net.minecraft.client.gui.components.events.GuiEventListener listener)
     
    static void
    drawCenteredString(net.minecraft.client.gui.GuiGraphics graphics, String text, int x, int y, int color)
     
    static void
    drawDebugGradient(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height)
     
    static void
    drawDiagonalGradient(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, int color1, int color2)
    Render a diagonal gradient by interpolating color for each pixel.
    static void
    drawHollowRect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int thickness, int color)
     
    static void
    drawHollowRect(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.navigation.ScreenRectangle rectangle, int thickness, int color)
     
    static void
    drawInsideRect(net.minecraft.client.gui.GuiGraphics guiGraphics, @NotNull net.minecraft.client.gui.navigation.ScreenRectangle rectangle, boolean shouldScissor, Runnable render)
     
    static void
    drawLine(net.minecraft.client.gui.GuiGraphics graphics, int x1, int y1, int x2, int y2, int color)
     
    static void
    drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component component, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, int padding, int color, boolean shadow)
     
    static void
    drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component component, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, net.minecraft.client.gui.navigation.ScreenRectangle scissor, int color, boolean shadow)
     
    static void
    drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.util.FormattedCharSequence sequence, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, int padding, int color, boolean shadow)
     
    static void
    drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.util.FormattedCharSequence sequence, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, net.minecraft.client.gui.navigation.ScreenRectangle scissor, int color, boolean shadow)
     
    static void
    drawString(net.minecraft.client.gui.GuiGraphics graphics, String text, int x, int y, int color)
     
    static void
    fillHorizontalGradient(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int leftColor, int rightColor)
     
    static void
    fillRect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color)
     
    static void
    fillVerticalGradient(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int topColor, int bottomColor)
     
    static int
    textColor(int color)
    A color without alpha bits is drawn opaque, like the font itself does; kept so callers can normalize colors the same way on every version.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EMPTY_RECT2I

      public static net.minecraft.client.renderer.Rect2i EMPTY_RECT2I
  • Constructor Details

    • RenderUtils

      public RenderUtils()
  • Method Details

    • createRect2i

      public static net.minecraft.client.renderer.Rect2i createRect2i(net.minecraft.client.gui.components.events.GuiEventListener listener)
    • fillRect

      public static void fillRect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color)
    • drawHollowRect

      public static void drawHollowRect(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.navigation.ScreenRectangle rectangle, int thickness, int color)
    • drawHollowRect

      public static void drawHollowRect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int thickness, int color)
    • drawLine

      public static void drawLine(net.minecraft.client.gui.GuiGraphics graphics, int x1, int y1, int x2, int y2, int color)
    • drawInsideRect

      public static void drawInsideRect(net.minecraft.client.gui.GuiGraphics guiGraphics, @NotNull @NotNull net.minecraft.client.gui.navigation.ScreenRectangle rectangle, boolean shouldScissor, Runnable render)
    • fillVerticalGradient

      public static void fillVerticalGradient(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int topColor, int bottomColor)
    • fillHorizontalGradient

      public static void fillHorizontalGradient(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int leftColor, int rightColor)
    • drawDiagonalGradient

      public static void drawDiagonalGradient(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, int color1, int color2)
      Render a diagonal gradient by interpolating color for each pixel. This is more expensive than a simple vertical/horizontal gradient.
    • drawDebugGradient

      public static void drawDebugGradient(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height)
    • textColor

      public static int textColor(int color)
      A color without alpha bits is drawn opaque, like the font itself does; kept so callers can normalize colors the same way on every version.
    • drawCenteredString

      public static void drawCenteredString(net.minecraft.client.gui.GuiGraphics graphics, String text, int x, int y, int color)
    • drawString

      public static void drawString(net.minecraft.client.gui.GuiGraphics graphics, String text, int x, int y, int color)
    • drawScrollingString

      public static void drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component component, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, int padding, int color, boolean shadow)
    • drawScrollingString

      public static void drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.util.FormattedCharSequence sequence, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, int padding, int color, boolean shadow)
    • drawScrollingString

      public static void drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.network.chat.Component component, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, net.minecraft.client.gui.navigation.ScreenRectangle scissor, int color, boolean shadow)
    • drawScrollingString

      public static void drawScrollingString(net.minecraft.client.gui.GuiGraphics guiGraphics, int currentTick, net.minecraft.client.gui.Font font, net.minecraft.util.FormattedCharSequence sequence, boolean center, net.minecraft.client.gui.navigation.ScreenRectangle bounds, net.minecraft.client.gui.navigation.ScreenRectangle scissor, int color, boolean shadow)
    • blitNineSliced

      public static void blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, net.minecraft.resources.ResourceLocation texture, int x, int y, int width, int height, int sliceSize, int textureWidth, int textureHeight)
    • blitNineSliced

      public static void blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, net.minecraft.resources.ResourceLocation texture, int x, int y, int width, int height, int sliceWidth, int sliceHeight, int textureWidth, int textureHeight)
    • blitNineSliced

      public static void blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, net.minecraft.resources.ResourceLocation texture, int x, int y, int width, int height, int sliceLeft, int sliceTop, int sliceRight, int sliceBottom, int textureWidth, int textureHeight)
    • blitNineSliced

      public static void blitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, NineSliceInfo.TextureInfo texture, int x, int y, int width, int height, NineSliceInfo.SliceBounds slices, NineSliceInfo.TextureRegion region)
    • blitRepeating

      public static void blitRepeating(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation atlas, int x, int y, int width, int height, int u, int v, int texW, int texH, int fullTexW, int fullTexH)
      Draws a texture section repeatedly to fill a rectangular area.
    • blitWithBorder

      public static void blitWithBorder(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int border)
    • blitWithBorder

      public static void blitWithBorder(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int u, int v, int width, int height, int textureWidth, int textureHeight, int topBorder, int bottomBorder, int leftBorder, int rightBorder)
    • blitInscribed

      public static void blitInscribed(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight, boolean centerX, boolean centerY)
    • blitInscribed

      public static void blitInscribed(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight)