| 42 |
|
|
| 43 |
|
//---PUBLIC METHODS--- |
| 44 |
|
|
| 45 |
< |
public void writeGraph(String filename, int width, int height, int grade){ |
| 45 |
> |
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; |
| 50 |
|
|
| 51 |
|
BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); |
| 52 |
|
|
| 53 |
< |
_pd.drawGraph(img, width, height, grade, _fg, _bg, _gradeColour); |
| 53 |
> |
_pd.drawGraph(img, width, height, gradeX, gradeY, _fg, _bg, _gradeColour); |
| 54 |
|
|
| 55 |
|
try { |
| 56 |
|
FileOutputStream fos = new FileOutputStream(new File(filename)); |
| 61 |
|
fos.flush(); |
| 62 |
|
fos.close(); |
| 63 |
|
|
| 64 |
< |
System.out.println(" - Written "+width+"x"+height+" graph file"); |
| 64 |
> |
System.out.println(" - Written "+width+"x"+height+" graph file"); |
| 65 |
|
} |
| 66 |
|
catch(Exception e){ |
| 67 |
|
System.out.println("Could not write the .gif file."); |