Home

class: Circle


The Circle object can be used to specify a hit area for displayObjects

Methods summary


Public methods
public clone(): PIXI.Circle
public contains(x: number, y: number): boolean
public getBounds(): PIXI.Rectangle
public clone(): PIXI.Circle
public contains(x: number, y: number): boolean
public getBounds(): PIXI.Rectangle

Properties


Name Type Attribute Description
x number public
y number public
radius number public
type number public

The type of the object, mainly used to avoid instanceof checks

x number public
y number public
radius number public
type number public

The type of the object, mainly used to avoid instanceof checks

Methods


clone(): PIXI.Circle

Creates a clone of this Circle instance

Returns:

PIXI.Circle


contains(x: number, y: number): boolean

Checks whether the x and y coordinates given are contained within this circle

Params:

Name Type Attribute Description
x

The X coordinate of the point to test

y

The Y coordinate of the point to test

Returns:

boolean


getBounds(): PIXI.Rectangle

Returns the framing rectangle of the circle as a Rectangle object

Returns:

PIXI.Rectangle


clone(): PIXI.Circle

Creates a clone of this Circle instance

Returns:

PIXI.Circle


contains(x: number, y: number): boolean

Checks whether the x and y coordinates given are contained within this circle

Params:

Name Type Attribute Description
x

The X coordinate of the point to test

y

The Y coordinate of the point to test

Returns:

boolean


getBounds(): PIXI.Rectangle

Returns the framing rectangle of the circle as a Rectangle object

Returns:

PIXI.Rectangle


  {
    "comment": "/**\n * The Circle object can be used to specify a hit area for displayObjects\n *\n * @class\n * @memberof PIXI\n */",
    "meta": {
        "range": [
            213,
            2216
        ],
        "filename": "Circle.js",
        "lineno": 12,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes",
        "code": {
            "id": "astnode100019152",
            "name": "Circle",
            "type": "ClassDeclaration",
            "paramnames": [
                "x",
                "y",
                "radius"
            ]
        }
    },
    "classdesc": "

The Circle object can be used to specify a hit area for displayObjects

", "kind": "class", "memberof": "PIXI", "name": "Circle", "longname": "PIXI.Circle", "scope": "static", "params": [ { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

The X coordinate of the center of this circle

", "name": "x" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

The Y coordinate of the center of this circle

", "name": "y" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 0, "description": "

The radius of the circle

", "name": "radius" } ], "___id": "T000002R001813", "___s": true, "$methods": [ { "comment": "/**\n * Creates a clone of this Circle instance\n *\n * @return {PIXI.Circle} a copy of the Circle\n */", "meta": { "range": [ 1255, 1330 ], "filename": "Circle.js", "lineno": 55, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019194", "name": "Circle#clone", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Creates a clone of this Circle instance

", "returns": [ { "type": { "names": [ "PIXI.Circle" ] }, "description": "

a copy of the Circle

" } ], "name": "clone", "longname": "PIXI.Circle#clone", "kind": "function", "memberof": "PIXI.Circle", "scope": "instance", "params": [], "___id": "T000002R001823", "___s": true, "skip": true, "slug": "PIXI.Circleclone", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * Checks whether the x and y coordinates given are contained within this circle\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this Circle\n */", "meta": { "range": [ 1650, 1931 ], "filename": "Circle.js", "lineno": 67, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019210", "name": "Circle#contains", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "

Checks whether the x and y coordinates given are contained within this circle

", "params": [ { "type": { "names": [ "number" ] }, "description": "

The X coordinate of the point to test

", "name": "x" }, { "type": { "names": [ "number" ] }, "description": "

The Y coordinate of the point to test

", "name": "y" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "

Whether the x/y coordinates are within this Circle

" } ], "name": "contains", "longname": "PIXI.Circle#contains", "kind": "function", "memberof": "PIXI.Circle", "scope": "instance", "___id": "T000002R001824", "___s": true, "skip": true, "slug": "PIXI.Circlecontains", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * Returns the framing rectangle of the circle as a Rectangle object\n *\n * @return {PIXI.Rectangle} the framing rectangle\n */", "meta": { "range": [ 2083, 2214 ], "filename": "Circle.js", "lineno": 89, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100019265", "name": "Circle#getBounds", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Returns the framing rectangle of the circle as a Rectangle object

", "returns": [ { "type": { "names": [ "PIXI.Rectangle" ] }, "description": "

the framing rectangle

" } ], "name": "getBounds", "longname": "PIXI.Circle#getBounds", "kind": "function", "memberof": "PIXI.Circle", "scope": "instance", "params": [], "___id": "T000002R001830", "___s": true, "skip": true, "slug": "PIXI.CirclegetBounds", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * Creates a clone of this Circle instance\n *\n * @return {PIXI.Circle} a copy of the Circle\n */", "meta": { "range": [ 1255, 1330 ], "filename": "Circle.js", "lineno": 55, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100093873", "name": "Circle#clone", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Creates a clone of this Circle instance

", "returns": [ { "type": { "names": [ "PIXI.Circle" ] }, "description": "

a copy of the Circle

" } ], "name": "clone", "longname": "PIXI.Circle#clone", "kind": "function", "memberof": "PIXI.Circle", "scope": "instance", "params": [], "___id": "T000002R008757", "___s": true, "skip": true, "slug": "PIXI.Circleclone", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * Checks whether the x and y coordinates given are contained within this circle\n *\n * @param {number} x - The X coordinate of the point to test\n * @param {number} y - The Y coordinate of the point to test\n * @return {boolean} Whether the x/y coordinates are within this Circle\n */", "meta": { "range": [ 1650, 1931 ], "filename": "Circle.js", "lineno": 67, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100093889", "name": "Circle#contains", "type": "MethodDefinition", "paramnames": [ "x", "y" ] }, "vars": { "": null } }, "description": "

Checks whether the x and y coordinates given are contained within this circle

", "params": [ { "type": { "names": [ "number" ] }, "description": "

The X coordinate of the point to test

", "name": "x" }, { "type": { "names": [ "number" ] }, "description": "

The Y coordinate of the point to test

", "name": "y" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "

Whether the x/y coordinates are within this Circle

" } ], "name": "contains", "longname": "PIXI.Circle#contains", "kind": "function", "memberof": "PIXI.Circle", "scope": "instance", "___id": "T000002R008758", "___s": true, "skip": true, "slug": "PIXI.Circlecontains", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * Returns the framing rectangle of the circle as a Rectangle object\n *\n * @return {PIXI.Rectangle} the framing rectangle\n */", "meta": { "range": [ 2083, 2214 ], "filename": "Circle.js", "lineno": 89, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": { "id": "astnode100093944", "name": "Circle#getBounds", "type": "MethodDefinition", "paramnames": [] }, "vars": { "": null } }, "description": "

Returns the framing rectangle of the circle as a Rectangle object

", "returns": [ { "type": { "names": [ "PIXI.Rectangle" ] }, "description": "

the framing rectangle

" } ], "name": "getBounds", "longname": "PIXI.Circle#getBounds", "kind": "function", "memberof": "PIXI.Circle", "scope": "instance", "params": [], "___id": "T000002R008764", "___s": true, "skip": true, "slug": "PIXI.CirclegetBounds", "filepath": "core\\math\\shapes\\Circle.js" } ], "$attributes": [ { "comment": "/**\n * @member {number} PIXI.Circle#x\n * @default 0\n */", "meta": { "range": [ 515, 594 ], "filename": "Circle.js", "lineno": 21, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "kind": "member", "name": "x", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Circle", "longname": "PIXI.Circle#x", "scope": "instance", "___id": "T000002R001815", "___s": true, "skip": true, "slug": "PIXI.Circlex", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * @member {number} PIXI.Circle#y\n * @default 0\n */", "meta": { "range": [ 624, 703 ], "filename": "Circle.js", "lineno": 27, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "kind": "member", "name": "y", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Circle", "longname": "PIXI.Circle#y", "scope": "instance", "___id": "T000002R001817", "___s": true, "skip": true, "slug": "PIXI.Circley", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * @member {number} PIXI.Circle#radius\n * @default 0\n */", "meta": { "range": [ 733, 817 ], "filename": "Circle.js", "lineno": 33, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "kind": "member", "name": "radius", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Circle", "longname": "PIXI.Circle#radius", "scope": "instance", "___id": "T000002R001819", "___s": true, "skip": true, "slug": "PIXI.Circleradius", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number} PIXI.Circle#type\n * @readOnly\n * @default PIXI.SHAPES.CIRC\n * @see PIXI.SHAPES\n */", "meta": { "range": [ 857, 1090 ], "filename": "Circle.js", "lineno": 39, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "description": "

The type of the object, mainly used to avoid instanceof checks

", "kind": "member", "name": "type", "type": { "names": [ "number" ] }, "readonly": true, "defaultvalue": "PIXI.SHAPES.CIRC", "see": [ "PIXI.SHAPES" ], "memberof": "PIXI.Circle", "longname": "PIXI.Circle#type", "scope": "instance", "___id": "T000002R001821", "___s": true, "skip": true, "slug": "PIXI.Circletype", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * @member {number} PIXI.Circle#x\n * @default 0\n */", "meta": { "range": [ 515, 594 ], "filename": "Circle.js", "lineno": 21, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "kind": "member", "name": "x", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Circle", "longname": "PIXI.Circle#x", "scope": "instance", "___id": "T000002R008749", "___s": true, "skip": true, "slug": "PIXI.Circlex", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * @member {number} PIXI.Circle#y\n * @default 0\n */", "meta": { "range": [ 624, 703 ], "filename": "Circle.js", "lineno": 27, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "kind": "member", "name": "y", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Circle", "longname": "PIXI.Circle#y", "scope": "instance", "___id": "T000002R008751", "___s": true, "skip": true, "slug": "PIXI.Circley", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * @member {number} PIXI.Circle#radius\n * @default 0\n */", "meta": { "range": [ 733, 817 ], "filename": "Circle.js", "lineno": 33, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "kind": "member", "name": "radius", "type": { "names": [ "number" ] }, "defaultvalue": "0", "memberof": "PIXI.Circle", "longname": "PIXI.Circle#radius", "scope": "instance", "___id": "T000002R008753", "___s": true, "skip": true, "slug": "PIXI.Circleradius", "filepath": "core\\math\\shapes\\Circle.js" }, { "comment": "/**\n * The type of the object, mainly used to avoid `instanceof` checks\n *\n * @member {number} PIXI.Circle#type\n * @readOnly\n * @default PIXI.SHAPES.CIRC\n * @see PIXI.SHAPES\n */", "meta": { "range": [ 857, 1090 ], "filename": "Circle.js", "lineno": 39, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\math\\shapes", "code": {} }, "description": "

The type of the object, mainly used to avoid instanceof checks

", "kind": "member", "name": "type", "type": { "names": [ "number" ] }, "readonly": true, "defaultvalue": "PIXI.SHAPES.CIRC", "see": [ "PIXI.SHAPES" ], "memberof": "PIXI.Circle", "longname": "PIXI.Circle#type", "scope": "instance", "___id": "T000002R008755", "___s": true, "skip": true, "slug": "PIXI.Circletype", "filepath": "core\\math\\shapes\\Circle.js" } ], "$staticmethods": [], "$staticproperties": [], "$augments": [], "$augmentedBy": [], "filepath": "core\\math\\shapes\\Circle.js" }