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.
Description
Section titled “Description”DrawShape.drawCircle and CircleShaderPass use it.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
CircleShader | inst() factory | Returns the shared shader. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Inherited from ShaderProgram (7)
delete · unbind · getShader · canDraw · isAvailable · gradient · uniformGradient
Creation details
Section titled “Creation details”CircleShader inst() factory
Returns the shared shader.
Method details
Section titled “Method details”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
