Package limn.graphics

Record Class BackdropEffect.Wash

java.lang.Object
java.lang.Record
limn.graphics.BackdropEffect.Wash
Record Components:
tint - colour over the washed backdrop
saturation - 0 turns the backdrop grey, 1 leaves it alone, above 1 boosts it. Values above about 2 clip in the bright channels
lift - 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.

  • Constructor Details

    • Wash

      public Wash(Color tint, float saturation, float lift)
      Creates an instance of a Wash record class.
      Parameters:
      tint - the value for the tint record component
      saturation - the value for the saturation record component
      lift - the value for the lift record component
    • Wash

      public Wash(Color tint, float saturation)
      A wash that only moves saturation, which is what this variant was before it lifted.
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • tint

      public Color tint()
      Returns the value of the tint record component.
      Specified by:
      tint in interface BackdropEffect
      Returns:
      the value of the tint record component
    • saturation

      public float saturation()
      Returns the value of the saturation record component.
      Returns:
      the value of the saturation record component
    • lift

      public float lift()
      Returns the value of the lift record component.
      Returns:
      the value of the lift record component