Class Pixel


  • public class Pixel
    extends java.lang.Object
    A pixel is an encoding of a color value at a specific location in a Raster. The pixel is encoded using an ARGB packed int.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int argb  
      int x  
      int y  
    • Constructor Summary

      Constructors 
      Constructor Description
      Pixel​(int x, int y, int argb)  
      Pixel​(int x, int y, int r, int g, int b, int alpha)  
    • Field Detail

      • argb

        public final int argb
      • x

        public final int x
      • y

        public final int y
    • Constructor Detail

      • Pixel

        public Pixel​(int x,
                     int y,
                     int argb)
      • Pixel

        public Pixel​(int x,
                     int y,
                     int r,
                     int g,
                     int b,
                     int alpha)
    • Method Detail

      • alpha

        public int alpha()
      • red

        public int red()
      • green

        public int green()
      • blue

        public int blue()
      • average

        public int average()
      • x

        public int x()
      • y

        public int y()
      • toInt

        @Deprecated
        public int toInt()
        Deprecated.
      • toARGBInt

        public int toARGBInt()
      • mapByComponent

        public Pixel mapByComponent​(java.util.function.Function<java.lang.Integer,​java.lang.Integer> f)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object