Skip to content

CircleShader

final class CircleShader
Extends: ShaderProgram
Package: dev.joid.lib.shader.impl · Module: core · Source: CircleShader.java

The shader of discs, which masks what is drawn outside a circle with a smooth edge.

DrawShape.drawCircle and CircleShaderPass use it.

ReturnsSignatureSummary
CircleShaderinst() factoryReturns the shared shader.

ReturnsSignatureSummary
voiduse(float radius, float centerX, float centerY, Runnable runnable) staticRuns runnable with the shader bound on the circle of radius centered on centerX, centerY, then restores the previous shader.
voidbind(float radius, float centerX, float centerY)Binds the shader on the circle, masking the texture tinted by the color.
voidbind(float radius, float centerX, float centerY, ShaderFillType type)Binds the shader on the circle and masks what type names.
Inherited from ShaderProgram (7)

delete · unbind · getShader · canDraw · isAvailable · gradient · uniformGradient

CircleShader inst() factory

Returns the shared shader.

void use(float radius, float centerX, float centerY, Runnable runnable) static

Runs runnable with the shader bound on the circle of radius centered on centerX, centerY, then restores the previous shader.

void bind(float radius, float centerX, float centerY)

Binds the shader on the circle, masking the texture tinted by the color.

void bind(float radius, float centerX, float centerY, ShaderFillType type)

Binds the shader on the circle and masks what type names.


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