Enum IMeasures.Channel

  • All Implemented Interfaces:
    Serializable, Comparable<IMeasures.Channel>
    Enclosing interface:
    IMeasures

    public static enum IMeasures.Channel
    extends Enum<IMeasures.Channel>
    The color channel
    +--------+--------+--------+--------+ bits
    |AAAAAAAA|RRRRRRRR|GGGGGGGG|BBBBBBBB|

    To get the green channel from 'color' (hex);
    int green = (color & 0xff00) << 8
    To convert an intensity to a color (hex): int value = (0xFF000000 & color) << 24 | (0x000000FF & color) << 16 | (0x000000FF & color) << 8 | (0x000000FF & color)

    • Method Detail

      • values

        public static IMeasures.Channel[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IMeasures.Channel c : IMeasures.Channel.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IMeasures.Channel valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getShiftSize

        public int getShiftSize()
      • getChannelByte

        public int getChannelByte()