-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPixel.java
More file actions
33 lines (30 loc) · 913 Bytes
/
Pixel.java
File metadata and controls
33 lines (30 loc) · 913 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Represents a pixel, which is a red, green, and blue value
*
* @author Richard Dunn, modified by Adam Heck, and Stephen Preast
* @version March 1, 2002
*/
public class Pixel
{
// RGB color values for this pixel (0-255)
private int red;
private int green;
private int blue;
/**
* Constructor for objects of class Pixel
* Initializes the pixel values;
*/
public Pixel(int red, int green, int blue)
{
this.red = red;
this.green = green;
this.blue = blue;
}
// Accessors and settors added by Adam Heck and Stephen Preast 4/20/04
public int getRed() { return red; }
public int getGreen() { return green; }
public int getBlue() { return blue;}
public void setRed(int value) { red = value; }
public void setGreen(int value) { green = value;}
public void setBlue(int value) { blue = value;}
}