Interface ColorInterpolator

  • All Known Implementing Classes:
    LinearColorInterpolator

    public interface ColorInterpolator
    Author:
    Spencer Bliven
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.awt.Color interpolate​(java.awt.Color a, java.awt.Color b, float mixing)
      Interpolates to a color between a and b
    • Method Detail

      • interpolate

        java.awt.Color interpolate​(java.awt.Color a,
                                   java.awt.Color b,
                                   float mixing)
        Interpolates to a color between a and b
        Parameters:
        a - First color
        b - Second color
        mixing - Mixing coefficient; the fraction of a in the result.
        Returns:
        The color between a and b
        Throws:
        java.lang.IllegalArgumentException - if mixing is not between 0 and 1