Ellipse

@Serializable
data class Ellipse(val center: Vector2, val xRadius: Double, val yRadius: Double) : Movable, Scalable2D, ShapeProvider, ShapeContourProvider(source)

Creates a new Ellipse.

Also see Circle.

Parameters

xRadius

Horizontal radius.

yRadius

Vertical radius.

Constructors

Link copied to clipboard
constructor(center: Vector2, xRadius: Double, yRadius: Double)

Functions

Link copied to clipboard
operator fun div(scale: Double): Ellipse
Link copied to clipboard
operator fun minus(right: Ellipse): Ellipse
Link copied to clipboard
open override fun movedBy(offset: Vector2): Ellipse

Creates a new Ellipse with the current center offset by offset with the same radii.

Link copied to clipboard
open override fun movedTo(position: Vector2): Ellipse

Creates a new Ellipse with the center at position with the same radii.

Link copied to clipboard
operator fun plus(right: Ellipse): Ellipse
Link copied to clipboard
open override fun position(u: Double, v: Double): Vector2

Returns a position in the bounding box for parameterized values u and v between 0.0 and 1.0 where (0.5, 0.5) is the center of the bounding box.

open fun position(uv: Vector2): Vector2

Returns a position in the bounding box for a parameterized uv value between (0.0, 0.0) and (1.0, 1.0) where (0.5, 0.5) is the center of the bounding box.

Link copied to clipboard
open override fun scaledBy(scale: Double, uAnchor: Double, vAnchor: Double): Ellipse

Creates a new shape with dimensions scaled by scale.

open override fun scaledBy(xScale: Double, yScale: Double, uAnchor: Double, vAnchor: Double): Ellipse

Creates a new Ellipse with the scale specified as multipliers for the current radii.

Link copied to clipboard
open override fun scaledTo(radius: Double): Ellipse

Creates a new Ellipse at the same position with equal radii.

open override fun scaledTo(xRadius: Double, yRadius: Double): Ellipse

Creates a new Ellipse at the same position with the given radii.

Link copied to clipboard
operator fun times(scale: Double): Ellipse

Properties

Link copied to clipboard
Link copied to clipboard
open override val contour: ShapeContour

the provided contour

Link copied to clipboard

The top-left corner of the Ellipse.

Link copied to clipboard
open override val scale: Vector2

Current scale of this shape. Generally equivalent to its dimensions.

Link copied to clipboard
open override val shape: Shape

the provided shape

Link copied to clipboard
Link copied to clipboard