|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lizardtech.djvu.GPixel
public class GPixel
This class represents a single pixel.
Field Summary | |
---|---|
static GPixel |
BLACK
A black pixel. |
static GPixel |
BLUE
A blue pixel. |
static GPixel |
GREEN
A green pixel. |
static int |
NUMELEMS
Number of colors in a pixel. |
static GPixel |
RED
A red pixel. |
static GPixel |
WHITE
A white pixel. |
Constructor Summary | |
---|---|
GPixel()
Creates a new GPixel object. |
|
GPixel(byte blue,
byte green,
byte red)
Creates a new GPixel object. |
Method Summary | |
---|---|
byte |
blueByte()
Query the blue color. |
java.lang.Object |
clone()
Create a clone of this pixel. |
boolean |
equals(java.lang.Object object)
Test if two pixels are equal. |
int |
getBlue()
Query the blue color. |
int |
getGreen()
Query the green color. |
int |
getRed()
Query the red color. |
byte |
greenByte()
Query the green color. |
int |
hashCode()
Generates a hashCode equal to 0xffRRGGBB. |
byte |
redByte()
Query the red color. |
void |
set(GPixel ref)
Copy the pixel values. |
void |
setBGR(int blue,
int green,
int red)
Initialize a pixel with bgr values. |
void |
setBlue(byte blue)
Set the blue color |
void |
setBlue(int blue)
Set the blue color |
void |
setGray(byte gray)
Set the gray color. |
void |
setGray(int gray)
Set the gray color. |
void |
setGreen(byte green)
Set the gray color. |
void |
setGreen(int green)
Set the green color. |
void |
setRed(byte red)
Set the red color. |
void |
setRed(int red)
Set the red color. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GPixel WHITE
public static final GPixel BLACK
public static final GPixel BLUE
public static final GPixel GREEN
public static final GPixel RED
public static final int NUMELEMS
Constructor Detail |
---|
public GPixel()
public GPixel(byte blue, byte green, byte red)
blue
- pixel valuegreen
- pixel valuered
- pixel valueMethod Detail |
---|
public void setBGR(int blue, int green, int red)
blue
- pixel valuegreen
- pixel valuered
- pixel valuepublic void setBlue(byte blue)
blue
- pixel valuepublic final void setBlue(int blue)
blue
- pixel valuepublic final int getBlue()
public byte blueByte()
public java.lang.Object clone()
clone
in class java.lang.Object
public final boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- pixel to compare to
public final void setGray(byte gray)
gray
- pixel valuepublic final void setGray(int gray)
gray
- pixel valuepublic void setGreen(byte green)
green
- pixel valuepublic final void setGreen(int green)
green
- pixel valuepublic final int getGreen()
public byte greenByte()
public int hashCode()
hashCode
in class java.lang.Object
public void setRed(byte red)
red
- pixel valuepublic final void setRed(int red)
red
- pixel valuepublic final int getRed()
public byte redByte()
public final void set(GPixel ref)
ref
- pixel to copy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |