Neuer Konstruktor, der ein Font-Objekt annimmt.
This commit is contained in:
parent
83ab156f71
commit
7635e29a98
|
@ -15,9 +15,14 @@ public class Text extends Shape {
|
|||
protected int width = 0, height = 0, ascent = 0;
|
||||
|
||||
public Text( double x, double y, String text ) {
|
||||
this(x, y, text, new Font(Font.SANS_SERIF, Font.PLAIN, STD_FONTSIZE));
|
||||
}
|
||||
|
||||
public Text( double x, double y, String text, Font font ) {
|
||||
super(x, y);
|
||||
font = new Font(Font.SANS_SERIF, Font.PLAIN, STD_FONTSIZE);
|
||||
this.font = font;
|
||||
setText(text);
|
||||
anchor = Options.Direction.CENTER;
|
||||
}
|
||||
|
||||
public Text( Text text ) {
|
||||
|
|
Loading…
Reference in New Issue