FlagFilter

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.

amplitude is the maximum y amplitude of the waves. crestCount is the number of crests of waves on the x axis. cyclesPerSecond is the number of times the animation would repeat over a second time is the elapsed time of the animation

Constructors

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

Types

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard

Maximum amplitude of the wave on the Y axis

Link copied to clipboard

Number of wave crests in the X axis

Link copied to clipboard

Number of repetitions of the animation per second

Link copied to clipboard
open override var filtering: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The elapsed time for the animation

Functions

Link copied to clipboard
open override fun computeBorder(texWidth: Int, texHeight: Int): MarginInt

The number of pixels the passed texture should be bigger at each direction: left, right, top, left.

Link copied to clipboard
fun Filter.getBorder(texWidth: Int, texHeight: Int): MarginInt
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
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