Scalable1D

interface Scalable1D

Functions

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

Link copied to clipboard
abstract fun scaledBy(    scale: Double,     uAnchor: Double = 0.5,     vAnchor: Double = 0.5): Scalable1D

Creates a new shape with dimensions scaled by scale.

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

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

Properties

Link copied to clipboard
abstract val scale: Vector2

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

Inheritors

Link copied to clipboard
Link copied to clipboard

Sources

Link copied to clipboard