Package-level declarations

Types

Link copied to clipboard
fun interface ComponentOp

component operations represent simple procedures that are ran before and after every render cycle. They can support animations and verification.

Link copied to clipboard
class Fade<S : Drawable>(drawable: S, alpha: Float, add: Boolean = true, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>
Link copied to clipboard
class KeyFrame(val start: Float, prev: KeyFrame?)
Link copied to clipboard

marker class for preventing illegal nesting.

Link copied to clipboard
class KeyFrames<T : Drawable>(self: T, animation: Animation) : ComponentOp.Animatable<T>

Keyframes are an easy way to create animations on components. PolyUI uses a Kotlin DSL to create them in an easy and concise way.

Link copied to clipboard
class Move<S : Component>(drawable: S, x: Float = drawable.x, y: Float = drawable.y, add: Boolean = true, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>
Link copied to clipboard
class Recolor<S : Drawable>(drawable: S, toColor: PolyColor, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>

Changes the color of the component to the specified color. Supports animation and callback function on finish.

Link copied to clipboard
class Resize<S : Component>(drawable: S, width: Float = drawable.width, height: Float = drawable.height, add: Boolean = true, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>
Link copied to clipboard
class Rotate<S : Drawable>(drawable: S, angleRad: Double, add: Boolean = true, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>
Link copied to clipboard
class Scale<S : Drawable>(drawable: S, scaleX: Float, scaleY: Float, add: Boolean = true, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>
Link copied to clipboard
class ShakeOp<S : Component>(drawable: S, durationNanos: Long, oscillations: Int, range: Float = 4.0f, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>
Link copied to clipboard
class Skew<S : Drawable>(drawable: S, skewX: Double, skewY: Double, add: Boolean = true, animation: Animation? = null, onFinish: S.() -> Unit? = null) : ComponentOp.Animatable<S>

Functions

Link copied to clipboard
fun <S : Drawable> S.keyframed(animation: Animation, frames: KeyFrames<S>.() -> Unit)

create a keyframe set for this component.