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
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