public static void roundedFullRoundedOutline(float x, float y, float x2, float y2, float round1, float round2, float round3, float round4, int color) {
GL11.glPushMatrix();
GL11.glTranslated((double)(x + round1), (double)(y + round1), 0.0D);
GL11.glRotated(-180.0D, 0.0D, 0.0D, 180.0D);
drawCircledTo(round1, color);
fixShadows();
GL11.glRotated(180.0D, 0.0D, 0.0D, -180.0D);
GL11.glTranslated((double)(-x - round1), (double)(-y - round1), 0.0D);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated((double)(x2 - round2), (double)(y + round2), 0.0D);
GL11.glRotated(-90.0D, 0.0D, 0.0D, 90.0D);
drawCircledTo(round2, color);
fixShadows();
GL11.glRotated(90.0D, 0.0D, 0.0D, -90.0D);
GL11.glTranslated((double)(-x2 + round2), (double)(-y - round2), 0.0D);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated((double)(x2 - round3), (double)(y2 - round3), 0.0D);
GL11.glRotated(-360.0D, 0.0D, 0.0D, 360.0D);
drawCircledTo(round3, color);
fixShadows();
GL11.glRotated(360.0D, 0.0D, 0.0D, -360.0D);
GL11.glTranslated((double)(-x2 + round3), (double)(-y2 + round3), 0.0D);
GL11.glPopMatrix();
GL11.glPushMatrix();
GL11.glTranslated((double)(x + round4), (double)(y2 - round4), 0.0D);
GL11.glRotated(-270.0D, 0.0D, 0.0D, 270.0D);
drawCircledTo(round4, color);
fixShadows();
GL11.glRotated(270.0D, 0.0D, 0.0D, -270.0D);
GL11.glTranslated((double)(-x - round4), (double)(-y2 + round4), 0.0D);
GL11.glPopMatrix();
drawRect((double)(x + round1) - 1.5D, (double)(y - 0.5F), (double)(x2 - round2), (double)(y + 0.5F), color);
drawRect(x2 - 0.5F, y + round2 - 1.0F, x2 + 0.5F, y2 - round3, color);
drawRect(x - 0.5F, y + round1, x + 0.5F, y2 - round4, color);
drawRect(x + round4, y2 - 0.5F, x2 - round3 + 1.5F, y2 + 0.5F, color);
}
public static void fixShadows() {
GlStateManager.enableBlend();
GlStateManager.disableBlend();
GlStateManager.color(1.0F, 1.0F, 1.0F);
}
public static void drawCircledTo(float r, int c) {
GL11.glPushMatrix();
GlStateManager.glLineWidth(2.0F);
float theta = 0.0175F;
float p = (float)Math.cos((double)theta);
float s = (float)Math.sin((double)theta);
float x = r *= 2.0F;
float y = 0.0F;
enableGL2D();
GL11.glScalef(0.5F, 0.5F, 0.5F);
GL11.glPointSize(1.0F);
GL11.glBegin(3);
for(int ii = 0; ii < 90; ++ii) {
glColor(c);
GL11.glVertex2f(x, (float)((double)y));
float t = x;
x = p * x - s * y;
y = s * t + p * y;
}
GL11.glEnd();
GL11.glScalef(2.0F, 2.0F, 2.0F);
disableGL2D();
GlStateManager.resetColor();
GlStateManager.glLineWidth(1.0F);
GL11.glPopMatrix();
}