Class RenderUtils
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.utils.RenderUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidblitInscribed(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.resources.ResourceLocation texture, int x, int y, int boundsWidth, int boundsHeight, int rectWidth, int rectHeight) static voidblitInscribed(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 voidblitNineSliced(net.minecraft.client.gui.GuiGraphics gfx, NineSliceInfo.TextureInfo texture, int x, int y, int width, int height, NineSliceInfo.SliceBounds slices, NineSliceInfo.TextureRegion region) static voidblitNineSliced(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 voidblitNineSliced(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 voidblitNineSliced(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 voidblitRepeating(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 voidblitWithBorder(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 voidblitWithBorder(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.Rect2icreateRect2i(net.minecraft.client.gui.components.events.GuiEventListener listener) static voiddrawCenteredString(net.minecraft.client.gui.GuiGraphics graphics, String text, int x, int y, int color) static voiddrawDebugGradient(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height) static voiddrawDiagonalGradient(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 voiddrawHollowRect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int thickness, int color) static voiddrawHollowRect(net.minecraft.client.gui.GuiGraphics graphics, net.minecraft.client.gui.navigation.ScreenRectangle rectangle, int thickness, int color) static voiddrawInsideRect(net.minecraft.client.gui.GuiGraphics guiGraphics, @NotNull net.minecraft.client.gui.navigation.ScreenRectangle rectangle, boolean shouldScissor, Runnable render) static voiddrawLine(net.minecraft.client.gui.GuiGraphics graphics, int x1, int y1, int x2, int y2, int color) static voiddrawScrollingString(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 voiddrawScrollingString(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 voiddrawScrollingString(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 voiddrawScrollingString(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 voiddrawString(net.minecraft.client.gui.GuiGraphics graphics, String text, int x, int y, int color) static voidfillHorizontalGradient(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int leftColor, int rightColor) static voidfillRect(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int color) static voidfillVerticalGradient(net.minecraft.client.gui.GuiGraphics graphics, int x, int y, int width, int height, int topColor, int bottomColor) static inttextColor(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.
-
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, 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) -
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) -
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)
-