Class DrawPaint

    • Constructor Detail

    • Method Detail

      • getPaint

        public java.awt.Paint getPaint​(java.awt.Graphics2D graphics,
                                       PaintStyle paint)
      • HSL2RGB

        public static java.awt.Color HSL2RGB​(double h,
                                             double s,
                                             double l,
                                             double alpha)
        Convert HSL values to a RGB Color.
        Parameters:
        h - Hue is specified as degrees in the range 0 - 360.
        s - Saturation is specified as a percentage in the range 1 - 100.
        l - Luminance is specified as a percentage in the range 1 - 100.
        alpha - the alpha value between 0 - 1
        Returns:
        the RGB Color object
      • srgb2lin

        public static int srgb2lin​(float sRGB)
        Convert sRGB float component [0..1] from sRGB to linear RGB [0..100000]
        See Also:
        Color.getRGBColorComponents(float[])
      • lin2srgb

        public static float lin2srgb​(int linRGB)
        Convert linear RGB [0..100000] to sRGB float component [0..1]
        See Also:
        Color.getRGBColorComponents(float[])