Scalable1D

interface Scalable1D

Functions

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.

abstract 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
abstract fun scaledBy(scale: Double, uAnchor: Double = 0.5, vAnchor: Double = 0.5): Scalable1D

Creates a new shape with dimensions scaled by scale.

scaledTo
Link copied to clipboard
common
abstract fun scaledTo(size: Double): Scalable1D

Creates a new shape at the same position with the given dimension, scaled uniformly.

Properties

scale
Link copied to clipboard
common
abstract val scale: Vector2

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

Inheritors

Circle
Link copied to clipboard
Scalable2D
Link copied to clipboard