mirror of
https://github.com/jneug/zeichenmaschine.git
synced 2026-10-12 09:56:33 +02:00
Neuer Konstruktor, der ein Font-Objekt annimmt.
This commit is contained in:
@@ -15,9 +15,14 @@ public class Text extends Shape {
|
|||||||
protected int width = 0, height = 0, ascent = 0;
|
protected int width = 0, height = 0, ascent = 0;
|
||||||
|
|
||||||
public Text( double x, double y, String text ) {
|
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);
|
super(x, y);
|
||||||
font = new Font(Font.SANS_SERIF, Font.PLAIN, STD_FONTSIZE);
|
this.font = font;
|
||||||
setText(text);
|
setText(text);
|
||||||
|
anchor = Options.Direction.CENTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text( Text text ) {
|
public Text( Text text ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user