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

Method drawRect

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

Source from the content-addressed store, hash-verified

157 }
158
159 public static void drawRect(double left, double top, double right, double bottom, int color) {
160 double i;
161 if (left < right) {
162 i = left;
163 left = right;
164 right = i;
165 }
166
167 if (top < bottom) {
168 i = top;
169 top = bottom;
170 bottom = i;
171 }
172
173 float a = (float) (color >> 24 & 255) / 255.0F;
174 float b = (float) (color >> 16 & 255) / 255.0F;
175 float g = (float) (color >> 8 & 255) / 255.0F;
176 float r = (float) (color & 255) / 255.0F;
177 bmh tesselator = bmh.a;
178 GL11.glEnable(3042);
179 GL11.glDisable(GL11.GL_TEXTURE_2D);
180 buu.c(770, 771, 1, 0);
181 GL11.glColor4f(b, g, r, a);
182 tesselator.b();
183 tesselator.a(left, bottom, 0.0D);
184 tesselator.a(right, bottom, 0.0D);
185 tesselator.a(right, top, 0.0D);
186 tesselator.a(left, top, 0.0D);
187 tesselator.a();
188 GL11.glEnable(GL11.GL_TEXTURE_2D);
189 GL11.glDisable(3042);
190 }
191
192 public static void drawGradientRect(double left, double top, double right, double bottom, int startColor, int endColor, boolean vertical) {
193 float a1 = (float) (startColor >> 24 & 255) / 255.0F;

Callers

nothing calls this directly

Calls 3

cMethod · 0.45
bMethod · 0.45
aMethod · 0.45

Tested by

no test coverage detected