Record Class FontFace
java.lang.Object
java.lang.Record
nl.colorize.multimedialib.stage.FontFace
public record FontFace(nl.colorize.util.ResourceFile origin, String family, int size, ColorRGB color)
extends Record
Describes a TrueType or FreeType font that can be used by the renderer
to draw text. The font consists of the font family and the font style.
MultimediaLib applications should not make assumptions on which system
fonts are available on the current platform. All fonts used by the
application should be included in the application's resource files.
Fonts can then be loaded from these files using MediaLoader.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.derive(int size) final booleanIndicates whether some other object is "equal to" this one.family()Returns the value of thefamilyrecord component.final inthashCode()Returns a hash code value for this object.nl.colorize.util.ResourceFileorigin()Returns the value of theoriginrecord component.Derives a version of this font that is scaled to match the specified display mode.intsize()Returns the value of thesizerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
FontFace
Creates an instance of aFontFacerecord class.- Parameters:
origin- the value for theoriginrecord componentfamily- the value for thefamilyrecord componentsize- the value for thesizerecord componentcolor- the value for thecolorrecord component
-
-
Method Details
-
derive
-
derive
-
scale
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
origin
public nl.colorize.util.ResourceFile origin()Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
family
Returns the value of thefamilyrecord component.- Returns:
- the value of the
familyrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-