Package-level declarations

Types

Link copied to clipboard
class BlurFilter(radius: Double = 4.0, expandBorder: Boolean = true, var optimize: Boolean = true) : ComposedFilter, FilterWithFiltering
Link copied to clipboard
class ColorMatrixFilter(colorMatrix: Matrix4, blendRatio: Double = 1.0) : ShaderFilter

A Filter applying a complex color transformation to the view.

Link copied to clipboard

A Filter applying a multiplicative and additive color transformation to the view.

Link copied to clipboard
open class ComposedFilter : Filter

Allows to create a single Filter that will render several filters in order.

Link copied to clipboard
class Convolute3Filter(var kernel: Matrix4, dist: Double = 1.0, applyAlpha: Boolean = false) : ShaderFilter

A Filter that will convolute near pixels (3x3) with a kernel. https://en.wikipedia.org/wiki/Kernel_(image_processing)

Link copied to clipboard
class DirectionalBlurFilter(var angle: Angle = 0.degrees, var radius: Double = 4.0, var expandBorder: Boolean = true) : ShaderFilter
Link copied to clipboard
class DitheringFilter(levels: Double = 4.0) : ShaderFilter
Link copied to clipboard
open class DropshadowFilter(var dropX: Double = 10.0, var dropY: Double = 10.0, var shadowColor: RGBA = Colors.BLACK.withAd(0.75), var blurRadius: Double = 4.0, var smoothing: Boolean = true) : FilterWithFiltering
Link copied to clipboard
interface Filter

Interface for View filters.

Link copied to clipboard
Link copied to clipboard
class FlagFilter(amplitude: Double = 80.0, crestCount: Double = 5.0, cyclesPerSecond: Double = 2.0, time: TimeSpan = 0.seconds) : ShaderFilter

A Flag Filter that distorts the texture using increasing waves to the right, keeping the left-most vertical static, as if connected to a flag pole.

Link copied to clipboard
open class IdentityFilter(val smoothing: Boolean) : Filter

Simple Filter that draws the texture pixels without any kind of transformation

Link copied to clipboard
class PageFilter(hratio: Ratio = Ratio.ZERO, hamplitude0: Double = 0.0, hamplitude1: Double = 10.0, hamplitude2: Double = 0.0, vratio: Ratio = Ratio.HALF, vamplitude0: Double = 0.0, vamplitude1: Double = 0.0, vamplitude2: Double = 0.0) : ShaderFilter

A filter that simulates a page of a book.

Link copied to clipboard
Link copied to clipboard

Abstract class for Views that paints the Texture using a FragmentShader (fragment).

Link copied to clipboard
class SwizzleColorsFilter(initialSwizzle: String = "rgba") : ShaderFilter

Allows to swizzle (interchange) color components via the swizzle property.

Link copied to clipboard
class TransitionFilter(var transition: TransitionFilter.Transition = Transition.CIRCULAR, reversed: Boolean = false, spread: Double = 1.0, ratio: Ratio = Ratio.ONE, filtering: Boolean = false) : ShaderFilter
Link copied to clipboard
class ViewRenderPhaseFilter(var filter: Filter? = null) : ViewRenderPhase
Link copied to clipboard
class WaveFilter(amplitude: Vector2D = Vector2D(10, 10), crestDistance: Vector2D = Vector2D(16, 16), cyclesPerSecond: Vector2D = Vector2D(1, 1), time: TimeSpan = 0.seconds) : ShaderFilter

A Wave Filter that distorts the texture using waves.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

An optional Filter attached to this view. Filters allow to render this view to a texture, and to control how to render that texture (using shaders, repeating the texture, etc.). You add multiple filters by creating a composite filter ComposedFilter.

Link copied to clipboard

Usually a value between 0.0, 1.0

Functions

Link copied to clipboard
fun <T : View> T.addFilter(filter: Filter): T
Link copied to clipboard
fun <T : View> T.addFilters(vararg filters: Filter): T
fun <T : View> T.addFilters(filters: List<Filter>): T
Link copied to clipboard
fun <T : View> T.backdropFilters(vararg filter: Filter?): T
Link copied to clipboard
Link copied to clipboard
inline fun <T : View> T.filters(vararg filters: Filter, filterScale: Number = this.filterScale): T
inline fun <T : View> T.filters(filters: List<Filter>, filterScale: Number = this.filterScale): T
Link copied to clipboard
inline fun <T : View> T.filterScale(scale: Double): T
Link copied to clipboard
fun Filter.getBorder(texWidth: Int, texHeight: Int): MarginInt
Link copied to clipboard
fun View.removeFilter(filter: Filter)
Link copied to clipboard
fun View.renderFiltered(ctx: RenderContext, filter: Filter, first: Boolean = true)
Link copied to clipboard
fun Filter.renderToTextureWithBorder(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, filterScale: Double, block: (Texture, matrix: Matrix) -> Unit)
Link copied to clipboard
fun Filter.renderToTextureWithBorderUnsafe(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, filterScale: Double, result: RenderToTextureResult = RenderToTextureResult()): RenderToTextureResult