c

io.scalajs.dom.html.pixijs

TextStyleOptions

class TextStyleOptions extends Object

A Text Object will create a line or multiple lines of text. To split a line you can use '\n' in your text string, or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object.

Annotations
@RawJSType() @ScalaJSDefined()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TextStyleOptions
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TextStyleOptions(font: UndefOr[String] = js.undefined, fill: UndefOr[|[String, Double]] = js.undefined, align: UndefOr[String] = js.undefined, stroke: UndefOr[|[String, Double]] = js.undefined, strokeThickness: UndefOr[LineWidth] = js.undefined, wordWrap: UndefOr[Boolean] = js.undefined, wordWrapWidth: UndefOr[Int] = js.undefined, lineHeight: UndefOr[Int] = js.undefined, dropShadow: UndefOr[Boolean] = js.undefined, dropShadowColor: UndefOr[String] = js.undefined, dropShadowAngle: UndefOr[Double] = js.undefined, dropShadowDistance: UndefOr[Int] = js.undefined, padding: UndefOr[Padding] = js.undefined, textBaseline: UndefOr[String] = js.undefined, lineJoin: UndefOr[String] = js.undefined, miterLimit: UndefOr[Int] = js.undefined)

    font

    default 'bold 20px Arial' The style and size of the font

    fill

    A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'

    align

    Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text

    stroke

    A canvas fillstyle that will be used on the text stroke e.g 'blue', '#FCFF00'

    strokeThickness

    A number that represents the thickness of the stroke. Default is 0 (no stroke)

    wordWrap

    Indicates if word wrap should be used

    wordWrapWidth

    The width at which text will wrap, it needs wordWrap to be set to true

    lineHeight

    The line height, a number that represents the vertical space that a letter uses

    dropShadow

    Set a drop shadow for the text

    dropShadowColor

    A fill style to be used on the dropshadow e.g 'red', '#00FF00'

    dropShadowAngle

    Set a angle of the drop shadow

    dropShadowDistance

    Set a distance of the drop shadow

    padding

    Occasionally some fonts are cropped on top or bottom. Adding some padding will prevent this from happening by adding padding to the top and bottom of text height.

    textBaseline

    The baseline of the text that is rendered.

    lineJoin

    The lineJoin property sets the type of corner created, it can resolve spiked text issues. Default is 'miter' (creates a sharp corner).

    miterLimit

    The miter limit to use when using the 'miter' lineJoin mode. This can reduce or increase the spikiness of rendered text.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. var align: UndefOr[String]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. var dropShadow: UndefOr[Boolean]
  8. var dropShadowAngle: UndefOr[Double]
  9. var dropShadowColor: UndefOr[String]
  10. var dropShadowDistance: UndefOr[Int]
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. var fill: UndefOr[|[String, Double]]
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. var font: UndefOr[String]
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  17. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  21. var lineHeight: UndefOr[Int]
  22. var lineJoin: UndefOr[String]
  23. var miterLimit: UndefOr[Int]
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  27. var padding: UndefOr[Padding]
  28. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  29. var stroke: UndefOr[|[String, Double]]
  30. var strokeThickness: UndefOr[LineWidth]
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. var textBaseline: UndefOr[String]
  33. def toLocaleString(): String
    Definition Classes
    Object
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. def valueOf(): Any
    Definition Classes
    Object
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. var wordWrap: UndefOr[Boolean]
  40. var wordWrapWidth: UndefOr[Int]

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped