1package de.ur.mi.oop.graphics;
3import de.ur.mi.oop.colors.Color;
4import de.ur.mi.oop.fonts.FontHelper;
13 private double rotationAngle;
15 private static final int DEFAULT_FONT_SIZE = 12;
16 private static final String DEFAULT_FONT =
"SansSerif";
30 public Label(
float x,
float y, String text) {
33 this.fontSize = DEFAULT_FONT_SIZE;
34 this.font = DEFAULT_FONT;
48 public Label(
float x,
float y, String text,
Color fontColor) {
58 this.fontSize = fontSize;
83 return metrics.stringWidth(text);
92 return metrics.getHeight();
101 return rotationAngle;
110 return Math.toRadians(rotationAngle);
120 rotationAngle = angle;
static FontMetrics getFontMetrics(String fontName, int fontSize)
void setColor(Color color)
Point getRotationOrigin()
double getRotationAngle()
Label(float x, float y, String text)
void setRotationAngle(double angle)
void setFontSize(int fontSize)
Label(float x, float y, String text, Color fontColor)
void setText(String text)
void setFont(String font)
double getRotationAngleInRadians()
double MAX_ROTATION_ANGLE
double MIN_ROTATION_ANGLE