ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter/GraphMaker.java
(Generate patch)

Comparing projects/cms/source/reports/DBReporter/GraphMaker.java (file contents):
Revision 1.1 by pjm2, Mon Dec 11 16:31:58 2000 UTC vs.
Revision 1.11 by pjm2, Sun Jan 7 19:13:14 2001 UTC

# Line 26 | Line 26 | public class GraphMaker {
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---
# Line 42 | Line 39 | public class GraphMaker {
39  
40   //---PUBLIC METHODS---
41  
42 <    public void writeGraph(String filename, int width, int height, int grade){
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));
42 >    public void writeGraph(String filename, int width, int height, int gradeX, int gradeY){
43          
44          BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
45  
46 <        _pd.drawGraph(img, width, height, grade, _fg, _bg, _gradeColour);
46 >        _pd.drawGraph(img, width, height, gradeX, gradeY);
47    
48          try {
49              FileOutputStream fos = new FileOutputStream(new File(filename));
# Line 61 | Line 54 | public class GraphMaker {
54              fos.flush();
55              fos.close();
56              
57 <            System.out.println("        - Written "+width+"x"+height+" graph file");
57 >            System.out.println("            - Written "+width+"x"+height+" graph file");
58          }
59          catch(Exception e){
60              System.out.println("Could not write the .gif file.");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines