Class BloomStyle.Builder

java.lang.Object
com.luciad.layers.styles.BloomStyle.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
BloomStyle

public static final class BloomStyle.Builder extends Object implements AutoCloseable
A builder class for creating bloom styles.
  • Constructor Details

    • Builder

      public Builder(@NotNull BloomStyle.Builder other)
      Copy constructor.
      Parameters:
      other - the builder to copy.
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • build

      @NotNull public BloomStyle build()
      Returns a newly created bloom style, based on the properties set on this builder.
      Returns:
      a newly created bloom style.
    • intensity

      @NotNull public BloomStyle.Builder intensity(double intensity) throws IllegalArgumentException
      Sets the intensity.

      The intensity is a non-negative factor applied to a pixel's regular color to increase the color's intensity. The more intense a color, the more bloom it produces.

      This method is optional. If it is not called, the intensity is 1.

      Parameters:
      intensity - the intensity
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the intensity is negative.
    • threshold

      @NotNull public BloomStyle.Builder threshold(double threshold) throws IllegalArgumentException
      Sets the threshold.

      The threshold is a non-negative number that a pixel's luminance must exceed to receive bloom.

      A typical value is 0, in which case all pixels of the shape with this BloomStyle will be bloomed. In some cases, for example when styling a 3D icon with PBR shading, you may wish to apply bloom only to the very bright specular highlights. In that case, you could set a higher threshold like 1.

      This method is optional. If it is not called, the threshold is 0.

      Parameters:
      threshold - the threshold
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - if the threshold is negative.