EngineAlpha
JVM
EngineAlpha
/
ea.actor
/
Text
Text
open
class
Text
Zur Darstellung von Texten im Programmbildschirm.
Author
Michael Andonie
Niklas Keller
Members
Constructors
Text
Link copied to clipboard
constructor
(
content
:
String
,
height
:
Float
,
fontName
:
String
,
style
:
Int
)
Konstruktor für Objekte der Klasse Text Möglich ist es auch, Fonts zu laden, die im Projektordner sind.
constructor
(
content
:
String
,
height
:
Float
,
fontName
:
String
)
Erstellt einen Text mit spezifischem Inhalt und Font.
constructor
(
content
:
String
,
height
:
Float
)
Erstellt einen Text mit spezifischem Inhalt und spezifischer Größe.
Properties
content
Link copied to clipboard
open
var
content
:
String
Der Wert des Textes
font
Link copied to clipboard
open
var
font
:
Font
Der Font der Darstellung
height
Link copied to clipboard
open
var
height
:
Float
Höhe des Textes.
Functions
get
Style
Link copied to clipboard
open
fun
getStyle
(
)
:
Int
get
Width
Link copied to clipboard
open
fun
getWidth
(
)
:
Float
render
Link copied to clipboard
open
fun
render
(
g
:
Graphics2D
,
pixelPerMeter
:
Float
)
set
Font
Link copied to clipboard
open
fun
setFont
(
fontName
:
String
)
Setzt einen neuen Font für den Text.
set
Style
Link copied to clipboard
open
fun
setStyle
(
style
:
Int
)
Setzt den Stil der Schriftart (Fett/Kursiv/Fett&Kursiv/Normal).
set
Width
Link copied to clipboard
open
fun
setWidth
(
width
:
Float
)