Skip to content

@putianyi888/vue3-plots


Defined in: geometry.ts:110

Axis-aligned ellipse.

contains includes boundary points. If either radius is not positive, all points are rejected.

Example ​

ts
const ellipse = new Ellipse(10, 20, 6, 4)
ellipse.contains({ x: 10, y: 20 }) // true

Extends ​

Constructors ​

Constructor ​

new Ellipse(cx, cy, rx, ry): Ellipse

Defined in: geometry.ts:113

Parameters ​

ParameterTypeDescription
cxnumberCenter x coordinate.
cynumberCenter y coordinate.
rxnumberHorizontal radius.
rynumberVertical radius.

Returns ​

Ellipse

Overrides ​

Shape.constructor

Properties ​

PropertyModifierTypeDefault valueDescriptionOverridesDefined in
cxreadonlynumberundefinedCenter x coordinate.-geometry.ts:115
cyreadonlynumberundefinedCenter y coordinate.-geometry.ts:117
rxreadonlynumberundefinedHorizontal radius.-geometry.ts:119
ryreadonlynumberundefinedVertical radius.-geometry.ts:121
typereadonly"ellipse"'ellipse'-Shape.typegeometry.ts:111

Methods ​

contains() ​

contains(point): boolean

Defined in: geometry.ts:132

Checks whether a point is inside or on the ellipse boundary.

Parameters ​

ParameterTypeDescription
pointPointPoint to test.

Returns ​

boolean

Whether the point is contained by the ellipse.

Overrides ​

Shape.contains


svgPath() ​

svgPath(): string

Defined in: geometry.ts:146

Generates an SVG path string for the ellipse.

Returns ​

string

SVG path data.

Overrides ​

Shape.svgPath