Exemplo n.º 1
1
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, ChartRenderingInfo info, bool encodeAlpha, int compression)
 {
   int num = encodeAlpha ? 1 : 0;
   if (@out == null)
   {
     string str = "Null 'out' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     BufferedImage bufferedImage = chart.createBufferedImage(width, height, 2, info);
     ChartUtilities.writeBufferedImageAsPNG(@out, bufferedImage, num != 0, compression);
   }
 }
Exemplo n.º 2
0
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, ChartRenderingInfo info)
 {
   if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
     EncoderUtil.writeBufferedImage(chart.createBufferedImage(width, height, info), "png", @out);
 }