Package com.sksamuel.scrimage.pixels
Class Pixel
- java.lang.Object
-
- com.sksamuel.scrimage.pixels.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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
alpha()
int
average()
int
blue()
boolean
equals(java.lang.Object o)
int
green()
int
hashCode()
Pixel
mapByComponent(java.util.function.Function<java.lang.Integer,java.lang.Integer> f)
int
red()
int
toARGBInt()
RGBColor
toColor()
int
toInt()
Deprecated.java.lang.String
toString()
int
x()
int
y()
-
-
-
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()
-
toColor
public RGBColor toColor()
-
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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-