Class RegionPainter.Alpha

java.lang.Object
com.intellij.util.ui.RegionPainter.Alpha
All Implemented Interfaces:
RegionPainter<Float>
Enclosing interface:
RegionPainter<T>

public abstract static class RegionPainter.Alpha extends Object implements RegionPainter<Float>
This class provides a base functionality to paint a region with the specified alpha.
  • Constructor Details

    • Alpha

      public Alpha()
  • Method Details

    • paint

      public final void paint(Graphics2D g, int x, int y, int width, int height, Float value)
      Description copied from interface: RegionPainter
      Renders to the given Graphics2D object.
      Specified by:
      paint in interface RegionPainter<Float>
      Parameters:
      g - the Graphics2D object to render to
      x - X position of the area to paint
      y - Y position of the area to paint
      width - width of the area to paint
      height - height of the area to paint
      value - an optional configuration parameter
    • getAlpha

      protected float getAlpha(Float value)
      Calculates alpha from the specified value.
      Parameters:
      value - a configuration parameter used to calculate alpha
      Returns:
      an alpha calculated from the specified value
    • getComposite

      protected Composite getComposite(float alpha)
      Returns new composite with the specified alpha.
      Parameters:
      alpha - the constant alpha to be multiplied with the alpha of the source
      Returns:
      new composite with the specified alpha
    • paint

      protected abstract void paint(Graphics2D g, int x, int y, int width, int height)
      Renders to the given Graphics2D object.
      Parameters:
      g - the Graphics2D object to render to
      x - X position of the area to paint
      y - Y position of the area to paint
      width - width of the area to paint
      height - height of the area to paint