drawRoundedRectWithOutline из данка дать типо?
public static void drawRoundedRectOutline(float x, float y, float width, float height, float radius, float outlineThickness, int outlineColor) {
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.disableTexture();
GL11.glEnable(GL_LINE_SMOOTH);
GL11.glLineWidth(outlineThickness);
// Ограничение радиуса
radius = Math.min(radius, Math.min(width / 2, height / 2));
// Установка цвета
float[] col = IntColor.rgb(outlineColor);
GL11.glColor4f(col[0], col[1], col[2], col[3]);
// Рисуем контур
GL11.glBegin(GL_LINE_LOOP);
// Верхняя линия
GL11.glVertex2f(x + radius, y);
GL11.glVertex2f(x + width - radius, y);
// Верхний правый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(270 + i);
GL11.glVertex2f(
x + width - radius + (float) Math.cos(angle) * radius,
y + radius + (float) Math.sin(angle) * radius
);
}
// Правая линия
GL11.glVertex2f(x + width, y + radius);
GL11.glVertex2f(x + width, y + height - radius);
// Нижний правый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(i);
GL11.glVertex2f(
x + width - radius + (float) Math.cos(angle) * radius,
y + height - radius + (float) Math.sin(angle) * radius
);
}
// Нижняя линия
GL11.glVertex2f(x + width - radius, y + height);
GL11.glVertex2f(x + radius, y + height);
// Нижний левый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(90 + i);
GL11.glVertex2f(
x + radius + (float) Math.cos(angle) * radius,
y + height - radius + (float) Math.sin(angle) * radius
);
}
// Левая линия
GL11.glVertex2f(x, y + height - radius);
GL11.glVertex2f(x, y + radius);
// Верхний левый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(180 + i);
GL11.glVertex2f(
x + radius + (float) Math.cos(angle) * radius,
y + radius + (float) Math.sin(angle) * radius
);
}
GL11.glEnd();
GL11.glDisable(GL_LINE_SMOOTH);
GlStateManager.enableTexture();
GlStateManager.disableBlend();
}
public static void drawRoundedRectOutline(float x, float y, float width, float height, float radius, float outlineThickness, int outlineColor) {
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
GlStateManager.disableTexture();
GL11.glEnable(GL_LINE_SMOOTH);
GL11.glLineWidth(outlineThickness);
// Ограничение радиуса
radius = Math.min(radius, Math.min(width / 2, height / 2));
// Установка цвета
float[] col = IntColor.rgb(outlineColor);
GL11.glColor4f(col[0], col[1], col[2], col[3]);
// Рисуем контур
GL11.glBegin(GL_LINE_LOOP);
// Верхняя линия
GL11.glVertex2f(x + radius, y);
GL11.glVertex2f(x + width - radius, y);
// Верхний правый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(270 + i);
GL11.glVertex2f(
x + width - radius + (float) Math.cos(angle) * radius,
y + radius + (float) Math.sin(angle) * radius
);
}
// Правая линия
GL11.glVertex2f(x + width, y + radius);
GL11.glVertex2f(x + width, y + height - radius);
// Нижний правый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(i);
GL11.glVertex2f(
x + width - radius + (float) Math.cos(angle) * radius,
y + height - radius + (float) Math.sin(angle) * radius
);
}
// Нижняя линия
GL11.glVertex2f(x + width - radius, y + height);
GL11.glVertex2f(x + radius, y + height);
// Нижний левый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(90 + i);
GL11.glVertex2f(
x + radius + (float) Math.cos(angle) * radius,
y + height - radius + (float) Math.sin(angle) * radius
);
}
// Левая линия
GL11.glVertex2f(x, y + height - radius);
GL11.glVertex2f(x, y + radius);
// Верхний левый угол
for (int i = 0; i <= 90; i += 5) {
float angle = (float) Math.toRadians(180 + i);
GL11.glVertex2f(
x + radius + (float) Math.cos(angle) * radius,
y + radius + (float) Math.sin(angle) * radius
);
}
GL11.glEnd();
GL11.glDisable(GL_LINE_SMOOTH);
GlStateManager.enableTexture();
GlStateManager.disableBlend();
}
не с данка,с своей базы