shape.Circle

Extends IShape.

"Circle" pixel shape.

Constructor | Methods

Constructor

shape.Circle(pixelGeometry[, params])

Creates the shape.

Parameters:

Parameter

Default value

Description

pixelGeometry*

ā€”

Type: IPixelCircleGeometry

Pixel geometry of a shape.

params

ā€”

Type: Object

Shape parameters.

params.fill

true

Type: Boolean

Flag for filling the shape.

params.outline

true

Type: Boolean

Flag for an outline.

params.strokeWidth

0

Type: Number

The outline width, in pixels.

* Mandatory parameter/option.

Methods

Name

Returns

Description

contains(position)

Boolean

Checks whether the passed point is located inside the shape.

Inherited from IShape.

equals(shape)

Boolean

Returns true if the passed shape is equivalent to the given one.

Inherited from IShape.

getBounds()

Number[][]|null

Returns coordinates of the two opposite corners of the area spanning the shape. The first item in the array is the corner with the smallest coordinate values relative to the rest of the points in the area; the second item is the corner with the largest coordinate values.

Inherited from IShape.

getGeometry()

IPixelGeometry

Returns pixel geometry of a shape.

Inherited from IShape.

getType()

String

Returns ID of the shape type.

Inherited from IShape.

scale(factor)

IShape

Creates a scaled copy of the shape.

Inherited from IShape.

shift(offset)

IShape

Creates a copy of the shape that is shifted by the specified amount.

Inherited from IShape.

In this article: