Record Class BackdropEffect.Clear
- Record Components:
tint- colour over the refracted backdropthickness- the pane's body, in points: both the width of the rounded rim and the optical depth the ray crosses, because for a bevelled pane they are the same measurement. 0 is a flat pane that refracts nothing and catches no highlight. A thicker pane rolls wider and carries the picture further sideways under the roll; past half the shape's smallest side the whole shape is beveldispersion- how far red and blue split either side of green, 0 (none) to 1. This spreads the index, not the displacement: at 1 the two ends of the spectrum differ by about four parts in a hundred, against roughly one in sixty for real crown glass, so even full dispersion is an exaggeration of an optical fringe rather than a prism
- All Implemented Interfaces:
BackdropEffect
- Enclosing interface:
BackdropEffect
This is the cheap variant, with three samples per pixel in the rim band and no blur chain, and the one that reads as glass rather than as a frosted overlay. Over busy content it keeps the content legible, which frosting does not.
The bevel is a quarter-round and the light is actually refracted through it. The sine of the angle the surface makes with the pane is the distance still to go across the rim, which needs no height map, and the picture behind is displaced by the lateral shift through a slab of that depth. That concentration is the whole look: real glass bends almost nothing across its flat middle and then very hard in the last fraction of the bevel. An earlier version ramped the displacement quadratically, which is smooth everywhere and reads as a soft lens.
No highlight rides the rim, and that is a decision rather than an omission. ADR 019 predicted a specular would be the cheapest thing that made this read as glass rather than as a lens; built and looked at, a key light fixed in the shader reads as painted-on, because it does not move when anything else in the window does. A highlight that belonged here would have to come from somewhere the scene actually knows about, and the toolkit has no light for a 2D canvas to ask.
-
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 TypeMethodDescriptionfloatReturns the value of thedispersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thethicknessrecord component.tint()Returns the value of thetintrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Clear
Creates an instance of aClearrecord class.- Parameters:
tint- the value for thetintrecord componentthickness- the value for thethicknessrecord componentdispersion- the value for thedispersionrecord component
-
Clear
A pane with a 12pt rim and a light optical fringe: the default glass of this toolkit.
-
-
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
-
thickness
public float thickness()Returns the value of thethicknessrecord component.- Returns:
- the value of the
thicknessrecord component
-
dispersion
public float dispersion()Returns the value of thedispersionrecord component.- Returns:
- the value of the
dispersionrecord component
-