pixi.primitives.Graphics
- type
- class
- extends
- pixi.display.DisplayObjectContainer
- metadata
- :native
- "PIXI.Graphics"
- parameters
child {DisplayObject} The DisplayObject to add to the container
- parameters
child {DisplayObject} The child to add
index {Int} The index to place the child in
- parameters
cx {Float} The x-coordinate of the center of the circle
cy {Float} The y-coordinate of the center of the circle
radius {Float} The radius of the circle
startAngle {Float} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
endAngle {Float} The ending angle, in radians
[anticlockwise] {Bool} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.
- returns
- {Graphics}
- parameters
{Float} x1 The x-coordinate of the beginning of the arc
{Float} y1 The y-coordinate of the beginning of the arc
{Float} x2 The x-coordinate of the end of the arc
{Float} y2 The y-coordinate of the end of the arc
{Float} radius The radius of the arc
- returns
- {Graphics}
- parameters
color {Int} the color of the fill
[alpha] {Float} the alpha of the fill
- returns
- {Graphics}
- parameters
{Float} cpX Control point x
{Float} cpY Control point y
{Float} cpX2 Second Control point x
{Float} cpY2 Second Control point y
{Float} toX Destination point x
{Float} toY Destination point y
- returns
- {Graphics}
- parameters
x {Float} The X coordinate of the center of the circle
y {Float} The Y coordinate of the center of the circle
radius {Float} The radius of the circle
- returns
- {Graphics}
- parameters
x {Float} The X coordinate of the center of the ellipse
y {Float} The Y coordinate of the center of the ellipse
width {Float} The half width of the ellipse
height {Float} The half height of the ellipse
- returns
- {Graphics}
- parameters
path {Array} The path data used to construct the polygon.
- returns
- {Graphics}
- parameters
x {Float} The X coord of the top-left of the rectangle
y {Float} The Y coord of the top-left of the rectangle
width {Float} The width of the rectangle
height {Float} The height of the rectangle
- returns
- {Graphics}
- parameters
x {Float} The X coord of the top-left of the rectangle
y {Float} The Y coord of the top-left of the rectangle
width {Float} The width of the rectangle
height {Float} The height of the rectangle
radius {Float} Radius of the rectangle corners
- returns
- {Graphics}
- parameters
{Circle|Rectangle|Ellipse|Line|Polygon} shape The Shape object to draw.
- returns
- {GraphicsData} The generated GraphicsData object.
- parameters
resolution {Float} The resolution of the texture being generated
scaleMode {Int} Should be one of the PIXI.scaleMode consts
[renderer] {CanvasRenderer|WebGLRenderer} The renderer used to generate the texture.
- returns
- {Texture} a texture of the graphics object
- parameters
[matrix] {Matrix}
- returns
- {Rectangle} the rectangular bounding area
- parameters
index {Int} The index to get the child from
- returns
- {DisplayObject}
- parameters
name {String} The name of the child
- returns
- {DisplayObject}
- metadata
- :keep
- parameters
child {DisplayObject} The DisplayObject instance to identify
- returns
- {Int} The index position of the child display object to identify
- returns
- {Rectangle} the rectangular bounding area
- parameters
lineWidth {Float} width of the line to draw, will update the object's stored style
color {Int} color of the line to draw, will update the object's stored style
alpha {Float} [alpha] of the line to draw, will update the object's stored style
- parameters
x {Float} the X coordinate to draw to
y {Float} the Y coordinate to draw to
- parameters
x {Float} the X coordinate to move to
y {Float} the Y coordinate to move to
- parameters
{Float} cx The x-coordinate of the center of the circle
{Float} cy The y-coordinate of the center of the circle
{Float} radius The radius of the circle
{Float} startAngle The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
{Float} endAngle The ending angle, in radians
{Float} [anticlockwise] Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.
- returns
- {Graphics}
- parameters
child {DisplayObject} The DisplayObject to remove
- parameters
index {Int} The index to get the child from
- parameters
beginIndex {Int} The beginning position. Predefined value is 0.
[endIndex] {Int} The ending position. Predefined value is children's array length.
- parameters
child {DisplayObject} The child DisplayObject instance for which you want to change the index number
index {Int} The resulting index number for the child display object
- parameters
stage {Stage} the stage that the object will have as its current stage reference
- parameters
child1 {DisplayObject}
child2 {DisplayObject}
- parameters
position {Point} The world origin to calculate from
- returns
- {Point} A point object representing the position of this object
- parameters
position {Point} The world origin to calculate from
[frm] {DisplayObject} The DisplayObject to calculate the global position from
- returns
- {Point} A point object representing the position of this object