Class

io.scalajs.dom.html.pixijs

Graphics

Related Doc: package pixijs

Permalink

class Graphics extends Container

The Graphics class contains methods used to draw primitive shapes such as lines, circles and rectangles to the display, and to color and fill them.

Annotations
@RawJSType() @native() @JSName( "Graphics" )
Linear Supertypes
Container, DisplayObject, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Graphics
  2. Container
  3. DisplayObject
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Graphics()

    Permalink

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. def addChild(child: DisplayObject): DisplayObject

    Permalink

    Adds a child to the container.

    Adds a child to the container.

    child

    The DisplayObject to add to the container.

    returns

    The child that was added.

    Definition Classes
    Container
  5. def addChildAt(child: DisplayObject, index: Int): DisplayObject

    Permalink

    Adds a child to the container at a specified index.

    Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

    child

    The DisplayObject to add to the container.

    index

    The index to place the child in

    returns

    The child that was added.

    Definition Classes
    Container
  6. var alpha: Alpha

    Permalink

    The alpha value of the group container.

    The alpha value of the group container.

    Definition Classes
    DisplayObject
  7. var alphanumber: Double

    Permalink

    The opacity of the object.

    The opacity of the object.

    Definition Classes
    Container
  8. var anchor: Point

    Permalink

    Definition Classes
    DisplayObject
  9. def angle: Double

    Permalink

    The angle of rotation of the group container, in degrees.

    The angle of rotation of the group container, in degrees. This adjusts the group itself by modifying its local rotation transform. This has no impact on the rotation/angle properties of the children, but it will update their worldTransform and on-screen orientation and position.

    Definition Classes
    DisplayObject
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def blendMode: BlendMode

    Permalink

    The blend mode to be applied to the graphic shape.

    The blend mode to be applied to the graphic shape. Apply a value of PIXI.BLEND_MODES.NORMAL to reset the blend mode.

    See also

    PIXI.BLEND_MODES

  12. def boundsPadding: Padding

    Permalink

    The bounds' padding used for bounds calculation.

  13. var cacheAsBitmap: Boolean

    Permalink

    Set if this display object is cached as a bitmap.

    Set if this display object is cached as a bitmap. This basically takes a snap shot of the display object as it is at that moment. It can provide a performance benefit for complex static displayObjects. To remove simply set this property to 'null'

    Definition Classes
    DisplayObject
  14. def children: Array[DisplayObject]

    Permalink

    The array of children of this container.

    The array of children of this container.

    Definition Classes
    Container
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def destroy(destroyChildren: Boolean): Unit

    Permalink

    Destroys the container

    Destroys the container

    destroyChildren

    optional: if set to true, all the children will have their destroy method called as well

    Definition Classes
    Container
  17. def destroy(): Unit

    Permalink

    Base destroy method for generic display objects.

    Base destroy method for generic display objects.

    Definition Classes
    DisplayObject
  18. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def fillAlpha: Alpha

    Permalink

    The alpha value used when filling the Graphics object.

  21. var filterArea: Rectangle

    Permalink

    The area the filter is applied to.

    The area the filter is applied to. This is used as more of an optimisation rather than figuring out the dimensions of the displayObject each frame you can set this rectangle.

    Definition Classes
    Container
  22. var filters: Array[AbstractFilter]

    Permalink

    Sets the filters for the displayObject.

    Sets the filters for the displayObject. IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. To remove filters simply set this property to 'null'

    Definition Classes
    Container
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. var height: Double

    Permalink

    The height of the Container, setting this will actually modify the scale to achieve the value set.

    The height of the Container, setting this will actually modify the scale to achieve the value set.

    Definition Classes
    Container
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. def isMask: Boolean

    Permalink

    Whether this shape is being used as a mask.

  30. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  31. def lineColor: Color

    Permalink

    The color of any lines drawn.

  32. def lineWidth: LineWidth

    Permalink

    The width (thickness) of any lines drawn.

  33. var mask: |[Graphics, Sprite]

    Permalink

    Sets a mask for the displayObject.

    Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. In PIXI a regular mask must be a PIXI.Graphics or a PIXI.Sprite object. This allows for much faster masking in canvas as it utilises shape clipping. To remove a mask, set this property to null.

    Definition Classes
    Container
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  37. def parent: Container

    Permalink

    The display object container that contains this display object.

    The display object container that contains this display object.

    Definition Classes
    Container
  38. var pivot: Point

    Permalink

    The pivot point of the displayObject that it rotates around

    The pivot point of the displayObject that it rotates around

    Definition Classes
    Container
  39. var position: Point

    Permalink

    The coordinate of the object relative to the local coordinates of the parent.

    The coordinate of the object relative to the local coordinates of the parent.

    Definition Classes
    Container
  40. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  41. var renderable: Boolean

    Permalink

    Can this object be rendered, if false the object will not be drawn but the updateTransform methods will still be called.

    Can this object be rendered, if false the object will not be drawn but the updateTransform methods will still be called.

    Definition Classes
    Container
  42. var rotation: Double

    Permalink

    The rotation of the object in radians.

    The rotation of the object in radians.

    Definition Classes
    Container
  43. var scale: Point

    Permalink

    The scale factor of the object.

    The scale factor of the object.

    Definition Classes
    Container
  44. def setParent(container: Container): Container

    Permalink

    Set the parent Container of this DisplayObject.

    Set the parent Container of this DisplayObject.

    container

    The Container to add this DisplayObject to.

    returns

    The Container that this DisplayObject was added to.

    Definition Classes
    DisplayObject
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  46. def tint: Color

    Permalink

    The tint applied to the graphic shape.

    The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.

  47. def toGlobal(position: Point): Point

    Permalink

    Calculates the global position of the display object.

    Calculates the global position of the display object.

    position

    The world origin to calculate from.

    returns

    A point object representing the position of this object.

    Definition Classes
    DisplayObject
  48. def toLocal(position: Point, from: DisplayObject = null): Point

    Permalink

    Calculates the local position of the display object relative to another point.

    Calculates the local position of the display object relative to another point.

    position

    The world origin to calculate from.

    from

    The DisplayObject to calculate the global position from.

    returns

    A point object representing the position of this object.

    Definition Classes
    DisplayObject
  49. def toLocaleString(): String

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

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

    Permalink
    Definition Classes
    Object
  52. var visible: Boolean

    Permalink

    Definition Classes
    DisplayObject
  53. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. var width: Double

    Permalink

    The width of the Container, setting this will actually modify the scale to achieve the value set.

    The width of the Container, setting this will actually modify the scale to achieve the value set.

    Definition Classes
    Container
  57. def worldAlpha: Alpha

    Permalink

    The multiplied alpha of the displayObject.

    The multiplied alpha of the displayObject.

    Definition Classes
    Container
  58. def worldTransform: Matrix

    Permalink

    Current transform of the object based on world (parent) factors

    Current transform of the object based on world (parent) factors

    Definition Classes
    DisplayObject
  59. def worldVisible: Boolean

    Permalink

    Indicates if the sprite is globally visible.

    Indicates if the sprite is globally visible.

    Definition Classes
    DisplayObject
  60. def x: Double

    Permalink

    The position of the displayObject on the x axis relative to the local coordinates of the parent.

    The position of the displayObject on the x axis relative to the local coordinates of the parent.

    Definition Classes
    DisplayObject
  61. def x_=(x: Double): Unit

    Permalink
    Definition Classes
    DisplayObject
  62. def y: Double

    Permalink

    The position of the displayObject on the y axis relative to the local coordinates of the parent.

    The position of the displayObject on the y axis relative to the local coordinates of the parent.

    Definition Classes
    DisplayObject
  63. def y_=(y: Double): Unit

    Permalink
    Definition Classes
    DisplayObject

Inherited from Container

Inherited from DisplayObject

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped