Package playn.core
Class TextFormat
java.lang.Object
playn.core.TextFormat
Contains info for laying out and drawing single- or multi-line text to a
Canvas
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a default text format instance.TextFormat
(Font font) Creates a text format instance with the specified font.TextFormat
(Font font, boolean antialias) Creates a configured text format instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
toString()
withAntialias
(boolean antialias) Returns a clone of this text format withantialias
configured as specified.Returns a clone of this text format with the font configured as specified.withFont
(String name, Font.Style style, float size) Returns a clone of this text format with the font configured as specified.Returns a clone of this text format with the font configured as specified.
-
Field Details
-
font
The font in which to render the text (null indicates that the default font is used). -
antialias
public final boolean antialiasWhether or not the text should be antialiased. Defaults to true. NOTE: this is not supported by the HTML5 backend.
-
-
Constructor Details
-
TextFormat
public TextFormat()Creates a default text format instance. -
TextFormat
Creates a text format instance with the specified font. -
TextFormat
Creates a configured text format instance.
-
-
Method Details
-
withFont
Returns a clone of this text format with the font configured as specified. -
withFont
Returns a clone of this text format with the font configured as specified. -
withFont
Returns a clone of this text format with the font configured as specified. -
withAntialias
Returns a clone of this text format withantialias
configured as specified. -
toString
-
equals
-
hashCode
public int hashCode()
-