|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectimages.Pixel
public class Pixel
This class represents a pixel that contains an RGB value.
Constructor Summary | |
---|---|
Pixel(int i)
LICENSE: This is open-source software released under the terms of the GPL (http://www.gnu.org/licenses/gpl.html). zz8 Creates a Pixel from an integer value. |
|
Pixel(int r,
int g,
int b)
Creates a Pixel from RGB values. |
Method Summary | |
---|---|
Pixel |
clone()
Returns a copy of the pixel. |
int |
getBlue()
Returns the blue value of the pixel. |
int |
getGreen()
Returns the green value of the pixel. |
int |
getRed()
Returns the red value of the pixel. |
int |
getValue()
Returns the integer value of the pixel. |
void |
setBlue(int b)
Resets the pixel's blue value. |
void |
setGreen(int g)
Resets the pixel's green value. |
void |
setRed(int r)
Resets the pixel's red value. |
java.lang.String |
toString()
Returns the string representation of the of the pixel. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Pixel(int i)
i
- the integer valuepublic Pixel(int r, int g, int b)
r
- the red valueg
- the green valueb
- the blue valueMethod Detail |
---|
public int getValue()
public int getRed()
public int getGreen()
public int getBlue()
public void setRed(int r)
r
- the red valuepublic void setGreen(int g)
g
- the green valuepublic void setBlue(int b)
b
- the blue valuepublic Pixel clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |