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

Method drawRect

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

Source from the content-addressed store, hash-verified

155 }
156
157 public static void drawRect(double left, double top, double right, double bottom, int color) {
158 double i;
159 if (left < right) {
160 i = left;
161 left = right;
162 right = i;
163 }
164
165 if (top < bottom) {
166 i = top;
167 top = bottom;
168 bottom = i;
169 }
170
171 float a = (float) (color >> 24 & 255) / 255.0F;
172 float b = (float) (color >> 16 & 255) / 255.0F;
173 float g = (float) (color >> 8 & 255) / 255.0F;
174 float r = (float) (color & 255) / 255.0F;
175 bon worldRenderer = bon.a();
176 bnt tesselator = worldRenderer.c();
177 GLUtil.enableBlend();
178 bob.z();
179 GLUtil.tryBlendFuncSeparate(770, 771, 1, 0);
180 GLUtil.color(b, g, r, a);
181 tesselator.a(7, bwm.e);
182 tesselator.b(left, bottom, 0.0D).d();
183 tesselator.b(right, bottom, 0.0D).d();
184 tesselator.b(right, top, 0.0D).d();
185 tesselator.b(left, top, 0.0D).d();
186 worldRenderer.b();
187 bob.y();
188 GLUtil.disableBlend();
189 }
190
191 public static void drawGradientRect(double left, double top, double right, double bottom, int startColor, int endColor, boolean vertical) {
192 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