MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / drawRect

Method drawRect

Minecraft-Utils/1.13/src/GuiHandle.java:177–209  ·  view source on GitHub ↗
(double left, double top, double right, double bottom, int color)

Source from the content-addressed store, hash-verified

175 }
176
177 public static void drawRect(double left, double top, double right, double bottom, int color) {
178 double i;
179 if (left < right) {
180 i = left;
181 left = right;
182 right = i;
183 }
184
185 if (top < bottom) {
186 i = top;
187 top = bottom;
188 bottom = i;
189 }
190
191 float a = (float) (color >> 24 & 255) / 255.0F;
192 float b = (float) (color >> 16 & 255) / 255.0F;
193 float g = (float) (color >> 8 & 255) / 255.0F;
194 float r = (float) (color & 255) / 255.0F;
195 cub worldRenderer = cub.a();
196 ctf tesselator = worldRenderer.c();
197 GLUtil.enableBlend();
198 ctp.z();
199 GLUtil.tryBlendFuncSeparate(770, 771, 1, 0);
200 GLUtil.color(b, g, r, a);
201 tesselator.a(7, ddk.m);
202 tesselator.b(left, bottom, 0.0D).d();
203 tesselator.b(right, bottom, 0.0D).d();
204 tesselator.b(right, top, 0.0D).d();
205 tesselator.b(left, top, 0.0D).d();
206 worldRenderer.b();
207 ctp.y();
208 GLUtil.disableBlend();
209 }
210
211 public static void drawGradientRect(double left, double top, double right, double bottom, int startColor, int endColor, boolean vertical) {
212 float a1 = (float) (startColor >> 24 & 255) / 255.0F;

Callers

nothing calls this directly

Calls 8

enableBlendMethod · 0.95
tryBlendFuncSeparateMethod · 0.95
colorMethod · 0.95
disableBlendMethod · 0.95
aMethod · 0.45
cMethod · 0.45
dMethod · 0.45
bMethod · 0.45

Tested by

no test coverage detected