|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectus.zuercher.gpx2map.util.Point
us.zuercher.gpx2map.plotter.Pixel
public class Pixel
Pixel extends Point and adds Color information.
| Field Summary | |
|---|---|
private int |
b
RGB color information. |
private int |
g
RGB color information. |
private int |
r
RGB color information. |
| Constructor Summary | |
|---|---|
Pixel(int x,
int y,
Color c)
Constructs a new Pixel with a specific Color. |
|
Pixel(int x,
int y,
int r,
int g,
int b)
Constructs a new Pixel with arbitrary color values and location. |
|
Pixel(Point point,
Color c)
Constructs a new Pixel with a specific Color. |
|
| Method Summary | |
|---|---|
void |
apply(int[] rgbPixel)
Applies this pixel's color values to an element of a raster line. |
Point |
asPoint()
Converts this Pixel to a plain Point. |
boolean |
equals(Object other)
Compares this Pixel against another for equality. |
int |
getBlue()
Returns the blue color value. |
int |
getGreen()
Returns the green color value. |
int |
getRed()
Returns the red color value. |
int |
hashCode()
Returns a reasonable hash code for a Pixel. |
String |
toString()
Returns a reasonable string representation of this Pixel. |
| Methods inherited from class us.zuercher.gpx2map.util.Point |
|---|
above, below, distanceTo, equals, getX, getY, leftOf, rightOf, within, within |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final int r
private final int g
private final int b
| Constructor Detail |
|---|
Pixel(int x,
int y,
int r,
int g,
int b)
x - x positiony - y positionr - red valueg - green valueb - blue value
Pixel(int x,
int y,
Color c)
Color.
x - x positiony - y positionc - color
Pixel(Point point,
Color c)
Color.
point - x/y positionc - color| Method Detail |
|---|
public int getRed()
public int getGreen()
public int getBlue()
public int hashCode()
hashCode in class Pointpublic boolean equals(Object other)
equals in class Pointother - the other Pixel
ClassCastException - if other is not a Pixelpublic String toString()
toString in class Pointpublic Point asPoint()
Point.
Point.public void apply(int[] rgbPixel)
rgbPixel - element of a raster line
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||