RoundedShaderPass
class RoundedShaderPass
Implements: IShaderPass
Package: dev.joid.lib.shader.pipeline.pass · Module: core · Source: RoundedShaderPass.java
Keeps only a rounded rectangle of the previous result, with smooth corners.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
RoundedShaderPass | create(float radius, float x1, float y1, float x2, float y2) factory | Creates a rounded mask whose inner rectangle runs from x1, y1 to x2, y2, in the coordinates you draw in, and whose edge lies radius outside it. |
| RoundedShaderPass(float radius, float x1, float y1, float x2, float y2) protected | Creates the pass, for a subclass. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | bind(ShaderPassContext context) | Binds the rounded shader on the texture of the previous result. |
void | unbind() | Unbinds the rounded shader. |
Inherited from IShaderPass (2)
Creation details
Section titled “Creation details”create
Section titled “create”RoundedShaderPass create(float radius, float x1, float y1, float x2, float y2) factory
Creates a rounded mask whose inner rectangle runs from x1, y1 to x2, y2, in the coordinates you draw in, and whose edge lies radius outside it.
To round a box of left, top, right, bottom, pass left + radius, top + radius, right - radius, bottom - radius; a side left at its edge keeps square corners.
RoundedShaderPass
Section titled “RoundedShaderPass”RoundedShaderPass(float radius, float x1, float y1, float x2, float y2) protected
Creates the pass, for a subclass.
Method details
Section titled “Method details”void bind(ShaderPassContext context)
Binds the rounded shader on the texture of the previous result.
unbind
Section titled “unbind”void unbind()
Unbinds the rounded shader.
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
