Class: Circle

Grape2D. Circle

new Circle(options)

Circle describes a circle shape. A circle is defined by it's radius.
Parameters:
Name Type Description
options Object Setup options. See Grape2D.Shape
Properties
Name Type Argument Description
position Grape2D.Vector <nullable>
The position of the polygon
radius number Radius of the circle.
Source:

Extends

Members

<private, static> TYPE :string

Type of the shape.
Type:
  • string
Source:

<protected> position :Grape2D.Vector

Shape's position.
Type:
Inherited From:
Source:

<private> radius :number

Circle's radius.
Type:
  • number
Source:

Methods

createBV()

Source:

getPosition() → {Grape2D.Vector}

Gets the position of the object.
Inherited From:
Source:
Returns:
The center position of the shape.
Type
Grape2D.Vector

getRadius() → {number}

Gets the radius of the circle.
Source:
Returns:
The radius of the circle.
Type
number

getStaticType()

Source:

render()

Source:

setPosition(position)

Set the position of the shape.
Parameters:
Name Type Description
position Grape2D.Vector The new position of the shape.
Inherited From:
Source:

setRadius(radius)

Sets the radius of the circle.
Parameters:
Name Type Description
radius number The new radius of the circle
Source: