Package limn.graphics
Record Class BackdropEffect.Wash
java.lang.Object
java.lang.Record
limn.graphics.BackdropEffect.Wash
- Record Components:
tint- colour over the washed backdropsaturation- 0 turns the backdrop grey, 1 leaves it alone, above 1 boosts it. Values above about 2 clip in the bright channelslift- moves the backdrop's brightness before the tint goes on: 0 leaves it, negative sinks it toward black, positive floats it toward white, and ±1 is the whole way. This is what makes a frosted panel readable over content it happens to match in tone, which desaturating alone cannot do
- All Implemented Interfaces:
BackdropEffect
- Enclosing interface:
BackdropEffect
public static record BackdropEffect.Wash(Color tint, float saturation, float lift)
extends Record
implements BackdropEffect
The backdrop, undisplaced, with its saturation moved. No blur and no refraction: one sample
per pixel, so it is the effect to reach for over video, where a blur costs bandwidth every
frame and a displacement fights the motion.
saturation is already the strength knob, and there is deliberately no
second one beside it. A separate "amount" that blended the result back toward the original
would be algebra, not a control: mixing by a toward a wash of s lands on
exactly the wash of 1 - a(1 - s), so every pair of values is reachable by moving
saturation alone. What lift adds instead is the axis saturation cannot
reach.
-
Nested Class Summary
Nested classes/interfaces inherited from interface limn.graphics.BackdropEffect
BackdropEffect.Blur, BackdropEffect.Clear, BackdropEffect.Crt, BackdropEffect.Pixelate, BackdropEffect.Wash -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatlift()Returns the value of theliftrecord component.floatReturns the value of thesaturationrecord component.tint()Returns the value of thetintrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Wash
Creates an instance of aWashrecord class.- Parameters:
tint- the value for thetintrecord componentsaturation- the value for thesaturationrecord componentlift- the value for theliftrecord component
-
Wash
A wash that only moves saturation, which is what this variant was before it lifted.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
tint
Returns the value of thetintrecord component.- Specified by:
tintin interfaceBackdropEffect- Returns:
- the value of the
tintrecord component
-
saturation
public float saturation()Returns the value of thesaturationrecord component.- Returns:
- the value of the
saturationrecord component
-
lift
public float lift()Returns the value of theliftrecord component.- Returns:
- the value of the
liftrecord component
-