/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package test.graph; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.geom.GeneralPath; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.Timer; /** * Do a simple approximation of what should be occurring when * SeriesRenderer is rendering, to get a baseline for expected * performance. * * I believe this shows that the SeriesRender should be much much faster than it is. * * @author jbf */ public class GeneralPathSpeedTest extends JPanel { int n= 1200000; int jj= 100; GeneralPath gp; double[] data; double dmin, dmax; int resetCount= 10; int rc= resetCount; private void updateData() { data= new double[n]; dmin= Double.POSITIVE_INFINITY; dmax= Double.NEGATIVE_INFINITY; double d=0; for ( int i=0; idmax ) dmax= d; if ( d