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
      • RGB2HSL

        public static double[] RGB2HSL​(java.awt.Color color)
        Convert a RGB Color to it corresponding HSL values.
        Returns:
        an array containing the 3 HSL values.
      • RGB2SCRGB

        public static double[] RGB2SCRGB​(java.awt.Color color)
        Convert sRGB Color to scRGB [0..1] (0:red,1:green,2:blue). Alpha needs to be handled separately.
        See Also:
        .Net implementation sRgbToScRgb
      • SCRGB2RGB

        public static java.awt.Color SCRGB2RGB​(double... scRGB)
        Convert scRGB [0..1] components (0:red,1:green,2:blue) to sRGB Color. Alpha needs to be handled separately.
        See Also:
        .Net implementation ScRgbTosRgb