WaveFilter
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.
amplitudeX, amplitudeY is the maximum x and y amplitudes of the waves. crestCountX and crestCountY is the number of crests of waves per axis cyclesPerSecondX and cyclesPerSecondY is the number of times the animation would repeat over a second time is the elapsed time of the animation
Properties
Functions
Link copied to clipboard
The number of pixels the passed texture should be bigger at each direction: left, right, top, left.
Link copied to clipboard
Link copied to clipboard
open override fun render(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, renderColorMul: RGBA, blendMode: BlendMode, filterScale: Double)
The method in charge of rendering the texture transformed using ctx and matrix. The method receives a texture that should be the original image with computeBorder additional pixels on each side.
Link copied to clipboard
Link copied to clipboard
fun Filter.renderToTextureWithBorderUnsafe(ctx: RenderContext, matrix: Matrix, texture: Texture, texWidth: Int, texHeight: Int, filterScale: Double, result: RenderToTextureResult = RenderToTextureResult()): RenderToTextureResult