Text

open class Text

Zur Darstellung von Texten im Programmbildschirm.

Author

Michael Andonie

Niklas Keller

Constructors

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

Link copied to clipboard
open var content: String
Der Wert des Textes
Link copied to clipboard
open var font: Font
Der Font der Darstellung
Link copied to clipboard
open var height: Float
Höhe des Textes.

Functions

Link copied to clipboard
open fun getStyle(): Int
Link copied to clipboard
open fun getWidth(): Float
Link copied to clipboard
open fun render(g: Graphics2D, pixelPerMeter: Float)
Link copied to clipboard
open fun setFont(fontName: String)
Setzt einen neuen Font für den Text.
Link copied to clipboard
open fun setStyle(style: Int)
Setzt den Stil der Schriftart (Fett/Kursiv/Fett&Kursiv/Normal).
Link copied to clipboard
open fun setWidth(width: Float)