Class

io.scalajs.dom.html.pixijs

TextStyleOptions

Related Doc: package pixijs

Permalink

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)

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. var align: UndefOr[String]

    Permalink

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

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. var dropShadow: UndefOr[Boolean]

    Permalink

    Set a drop shadow for the text

  8. var dropShadowAngle: UndefOr[Double]

    Permalink

    Set a angle of the drop shadow

  9. var dropShadowColor: UndefOr[String]

    Permalink

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

  10. var dropShadowDistance: UndefOr[Int]

    Permalink

    Set a distance of the drop shadow

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. var fill: UndefOr[|[String, Double]]

    Permalink

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

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. var font: UndefOr[String]

    Permalink

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

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  18. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  21. var lineHeight: UndefOr[Int]

    Permalink

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

  22. var lineJoin: UndefOr[String]

    Permalink

    The lineJoin property sets the type of corner created, it can resolve spiked text issues.

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

  23. var miterLimit: UndefOr[Int]

    Permalink

    The miter limit to use when using the 'miter' lineJoin mode.

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

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. var padding: UndefOr[Padding]

    Permalink

    Occasionally some fonts are cropped on top or bottom.

    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.

  28. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  29. var stroke: UndefOr[|[String, Double]]

    Permalink

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

  30. var strokeThickness: UndefOr[LineWidth]

    Permalink

    A number that represents the thickness of the stroke.

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

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. var textBaseline: UndefOr[String]

    Permalink

    The baseline of the text that is rendered.

  33. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  34. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  35. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  36. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. var wordWrap: UndefOr[Boolean]

    Permalink

    Indicates if word wrap should be used

  40. var wordWrapWidth: UndefOr[Int]

    Permalink

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

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped