Skip to content

CircleNodeEffect

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

Cuts what a node draws to the largest disc centered in its bounds.

A blue square cut into a disc

The disc takes the shorter side of the node as its diameter: a square image becomes a round avatar. A ShadowNodeEffect on the same node draws a round shadow, and a BorderNodeEffect outlines the disc. Its priority is 100, so its pass runs before a blur and a border.

ReturnsSignatureSummary
CircleNodeEffectcreate() factoryCreates the effect.
CircleNodeEffect() protectedCalled by a subclass.

Inherited from NodeEffect (2)

priority · scope

ReturnsSignatureSummary
IShaderPasstoShaderPass(Node node)Returns the pass that keeps the disc centered in the node, of radius half its shorter side.
Inherited from NodeEffect (4)

draw · shouldApply · toShaderPasses · copy

CircleNodeEffect create() factory

Creates the effect.

CircleNodeEffect() protected

Called by a subclass.

IShaderPass toShaderPass(Node node)

Returns the pass that keeps the disc centered in the node, of radius half its shorter side.


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