Skip to content

BlurNodeEffect

class BlurNodeEffect
Extends: NodeEffect<Node>
Package: dev.joid.lib.ui.node.effect.impl · Module: core · Source: BlurNodeEffect.java

Blurs what a node draws with a horizontal then a vertical Gaussian pass.

The placeholder image, blurred

It blurs the pixels of the node, and with the CHILDREN scope those of its children too; it never blurs what lies behind the node. Its priority is 150: it blurs the result of a rounded or circle pass, and a border drawn after it stays sharp.

ReturnsSignatureSummary
BlurNodeEffectcreate(float radius) factoryCreates a blur of this radius, in design pixels.
BlurNodeEffectcreate(Supplier radiusSupplier) factoryCreates a blur whose radius follows a Supplier: a signal, a derived value or a lambda.
BlurNodeEffect(Supplier radiusSupplier) protectedCalled by a subclass with the same argument as create(Supplier).

PropertyTypeDefaultSummary
radius signalfloatset at creationStrength of the blur, in design pixels; 0F or less turns the effect off.
Inherited from NodeEffect (2)

priority · scope

ReturnsSignatureSummary
booleanshouldApply(Node node)Returns false while the radius is 0F or less.
List<IShaderPass>toShaderPasses(Node node)Returns a horizontal and a vertical BlurShaderPass of the current radius.
Inherited from NodeEffect (3)

draw · toShaderPass · copy

BlurNodeEffect create(float radius) factory

Creates a blur of this radius, in design pixels.

BlurNodeEffect create(Supplier<Float> radiusSupplier) factory

Creates a blur whose radius follows a Supplier: a signal, a derived value or a lambda.

BlurNodeEffect(Supplier<Float> radiusSupplier) protected

Called by a subclass with the same argument as create(Supplier).

  • this radius(float radius) fluent
  • this radius(Supplier<Float> radiusSupplier) fluent signal
  • float getRadius()

Default: set at creation

Strength of the blur, in design pixels; 0F or less turns the effect off.

boolean shouldApply(Node node)

Returns false while the radius is 0F or less.

List<IShaderPass> toShaderPasses(Node node)

Returns a horizontal and a vertical BlurShaderPass of the current radius.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page