Package limn.graphics

Record Class BackdropEffect.Pixelate

java.lang.Object
java.lang.Record
limn.graphics.BackdropEffect.Pixelate
Record Components:
tint - colour over the pixelated backdrop; usually clear or barely tinted, since a tint that hides the blocks also hides that something was hidden
cell - cell edge in points, at least 1. The grid is aligned to the framebuffer, not to the shape, so a panel that moves does not shimmer through its own cells
All Implemented Interfaces:
BackdropEffect
Enclosing interface:
BackdropEffect

public static record BackdropEffect.Pixelate(Color tint, float cell) extends Record implements BackdropEffect
The backdrop reduced to squares: redaction, not decoration. Each cell samples one point, so what the cell hid cannot be recovered from the output: this is the variant to put over a field before a screenshot, and the reason it exists in a toolkit at all.
  • Constructor Details

    • Pixelate

      public Pixelate(Color tint, float cell)
      Creates an instance of a Pixelate record class.
      Parameters:
      tint - the value for the tint record component
      cell - the value for the cell record component
  • 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
    • cell

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