java.lang.Object
org.praxislive.video.render.utils.RGBMath

public class RGBMath extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    blend(int src, int dest, int alpha)
     
    static int
    diff(int a, int b)
    Calculates difference between supplied values.
    static int
    max(int a, int b)
    Calculates highest value of supplied args
    static int
    max(int a, int b, int c)
     
    static int
    min(int a, int b)
    Calculates lowest value of supplied args
    static int
    min(int a, int b, int c)
     
    static int
    mix(int a, int b, int f)
    Calculates mix of supplied args.
    static int
    mix(int a, int b, int af, int bf)
    Calculates mix of supplied args.
    static int
    mult(int val, int multiplier)
     
    static int
    multARGB(int src, int multiplier)
     
    static int
    multRGB(int src, int multiplier)
     
    static int
    premultiply(int argb)
     
    static int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • min

      public static int min(int a, int b)
      Calculates lowest value of supplied args
      Parameters:
      a - first integer
      b - second integer
      Returns:
      int lowest value
    • min

      public static int min(int a, int b, int c)
    • mix

      public static int mix(int a, int b, int f)
      Calculates mix of supplied args. All args should be in range 0 - 255. param a first integer value param b second integer value param f mix integer value (0 - 255) 0 all a / 255 all b
    • mix

      public static int mix(int a, int b, int af, int bf)
      Calculates mix of supplied args. All args should be in range 0 - 255. param a first integer value param b second integer value param af level of a (0 - 255) param bf mix integer value (0 - 255) 0 all a / 255 all b
    • max

      public static int max(int a, int b)
      Calculates highest value of supplied args
      Parameters:
      a - first integer
      b - second integer
      Returns:
      int highest value
    • max

      public static int max(int a, int b, int c)
    • diff

      public static int diff(int a, int b)
      Calculates difference between supplied values. Returned value is always positive.
      Parameters:
      a - first integer
      b - second integer
      Returns:
      int difference
    • multRGB

      public static int multRGB(int src, int multiplier)
    • multARGB

      public static int multARGB(int src, int multiplier)
    • blend

      public static int blend(int src, int dest, int alpha)
    • mult

      public static int mult(int val, int multiplier)
    • random

      public static int random()
    • premultiply

      public static int premultiply(int argb)