Documentation of 'jvx.number.PuColorMapIf' Java class
PuColorMapIf ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.number

Interface PuColorMapIf

  • All Known Implementing Classes:
    PuColorMapBoolean, PuColorMapJv, PuColorMapTriple


    public interface PuColorMapIf
    A color map assigns colors to each numbers in [0, 1].

    Sample usage:

            m_colorBar.setColorMap( new PuColorMapIf() {
                    public Color getColor(double x) {
                            float c1 = 0, c0 = 0.66f;// blue = 0, red = 1
                            float frac = (c1-c0)*(float)x + c0;
                            return new Color(Color.HSBtoRGB(frac, 1f, 1f));
                    }
            });
     
    Author:
    Matthias Nieser
    Version:
    05.03.2015, 2.00 revised (kp) Class renamed to PuColorMapIf from PuColorTableIf.
    27.09.2006, 1.00 created (mn)
    • Method Detail

      • getColor

        java.awt.Color getColor(double value)
        Get the color for a value in [0, 1].
"JavaView? v5.03.003"

"

The software JavaView? is copyright protected. All Rights Reserved.
"

Ads help maintain this website.