public static void drawRoundedRect(double x, double y, double x1, double y1, double radius, int color) {
GL11.glPushMatrix();
GL11.glPushAttrib(1048575);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_TEXTURE_2D);
int i;
float f = (float) (color >> 24 & 255) / 255.0f;
float f1 = (float) (color >> 16 & 255) / 255.0f;
float f2 = (float) (color >> 8 & 255) / 255.0f;
float f3 = (float) (color & 255) / 255.0f;
GL11.glPushAttrib(0);
GL11.glScaled(0.5, 0.5, 0.5);
x *= 2.0;y *= 2.0;x1 *= 2.0;y1 *= 2.0;
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glColor4f(f1, f2, f3, f);
GL11.glEnable(GL11.GL_LINE_SMOOTH);
GL11.glBegin(GL11.GL_POLYGON);
for (i = 0; i <= 90; i += 3) {
GL11.glVertex2d(x + radius + Math.sin(i * 3.141592653589793 / 180.0) * (radius * -1.0),
y + radius + Math.cos(i * 3.141592653589793 / 180.0) * (radius * -1.0));
}
for (i = 90; i <= 180; i += 3) {
GL11.glVertex2d((x + radius + Math.sin(i * 3.141592653589793 / 180.0) * (radius * -1.0)),
y1 - radius + Math.cos(i * 3.141592653589793 / 180.0) * (radius * -1.0));
}
for (i = 0; i <= 90; i += 3) {
GL11.glVertex2d(x1 - radius + Math.sin(i * 3.141592653589793 / 180.0) * radius,
y1 - radius + Math.cos(i * 3.141592653589793 / 180.0) * radius);
}
for (i = 90; i <= 180; i += 3) {
GL11.glVertex2d(x1 - radius + Math.sin(i * 3.141592653589793 / 180.0) * radius,
y + radius + Math.cos(i * 3.141592653589793 / 180.0) * radius);
}
GL11.glEnd();
GL11.glPopAttrib();
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopAttrib();
GL11.glPopMatrix();
}