Ellipse

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

Creates a new Ellipse.

Also see Circle.

Parameters

xRadius

Horizontal radius.

yRadius

Vertical radius.

Constructors

Ellipse
Link copied to clipboard
common
fun Ellipse(x: Double, y: Double, xRadius: Double, yRadius: Double)
Ellipse
Link copied to clipboard
common
fun Ellipse(center: Vector2, xRadius: Double, yRadius: Double)

Functions

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

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

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

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

plus
Link copied to clipboard
common
operator fun plus(right: Ellipse): Ellipse
position
Link copied to clipboard
common
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.

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.

scaledBy
Link copied to clipboard
common
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.

scaledTo
Link copied to clipboard
common
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.

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

Properties

center
Link copied to clipboard
common
val center: Vector2
contour
Link copied to clipboard
common
open override val contour: ShapeContour

the provided contour

corner
Link copied to clipboard
common
val corner: Vector2

The top-left corner of the Ellipse.

scale
Link copied to clipboard
common
open override val scale: Vector2

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

shape
Link copied to clipboard
common
open override val shape: Shape

the provided shape

xRadius
Link copied to clipboard
common
val xRadius: Double
yRadius
Link copied to clipboard
common
val yRadius: Double