| 26 |
|
* The current CVS revision of this class |
| 27 |
|
*/ |
| 28 |
|
public final String REVISION = "$Revision$"; |
| 29 |
+ |
|
| 30 |
|
|
| 30 |
– |
private final int _fg = 0; // black |
| 31 |
– |
private final int _bg = 16777215; // white |
| 32 |
– |
private final int _gradeColour = 13421823; // i-scream blue ;) |
| 33 |
– |
|
| 31 |
|
//---STATIC METHODS--- |
| 32 |
|
|
| 33 |
|
//---CONSTRUCTORS--- |
| 40 |
|
//---PUBLIC METHODS--- |
| 41 |
|
|
| 42 |
|
public void writeGraph(String filename, int width, int height, int gradeX, int gradeY){ |
| 46 |
– |
|
| 47 |
– |
//Uncomment this to find out the integer values for certain colours. |
| 48 |
– |
//int rgb = 0*256*256 + 0*256 + 0; |
| 49 |
– |
//System.out.println ((rgb & 0xff00ff00) | ((rgb & 0xff0000) >> 16) | ((rgb & 0xff) << 16)); |
| 43 |
|
|
| 44 |
|
BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); |
| 45 |
|
|
| 46 |
< |
_pd.drawGraph(img, width, height, gradeX, gradeY, _fg, _bg, _gradeColour); |
| 46 |
> |
_pd.drawGraph(img, width, height, gradeX, gradeY); |
| 47 |
|
|
| 48 |
|
try { |
| 49 |
|
FileOutputStream fos = new FileOutputStream(new File(filename)); |