Class IndexImage.Counter
java.lang.Object
org.apache.batik.ext.awt.image.rendered.IndexImage.Counter
- Enclosing class:
- IndexImage
Used to track a color and the number of pixels of that colors
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
val
final int valcontains the 'packed' rgb-color for this point. Must not change after construction! -
count
int countthe number of image-pixels with this color.
-
-
Constructor Details
-
Counter
Counter(int val)
-
-
Method Details
-
add
boolean add(int val) -
getRgb
int[] getRgb(int[] rgb) convert the color-point of this counter to an rgb-array. To avoid creating lots of arrays, the caller passes the array to store the result.- Parameters:
rgb
- an int[ 3 ] to store the result.- Returns:
- an int-array with rgb-color-values (same as rgb-parameter)
-