package pic3;
public class pro {
public static void main(String[] args) {
pro te=new pro();
}
pro(){
int tr,x,y;
x=100;
y=100;
for(tr=1;tr<101;tr++){
graph sub=new graph();
x=x+1;
y=y+1;
sub.makedata(x,y,"data/"+tr+".jpg");
}
}
}
package pic3;
import java.awt.*;
import java.awt.Color;
import java.awt.image.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import java.awt.Polygon;
import java.util.HashMap;
class graph{
int number_adm;
int h=700;
int w=700;
int s,datanumber;
int[] number_pol=new int[20000];
int number_p;
String[][] pol=new String[500][500];
int[] point=new int[20000];
String maxg;
double z;
int number_shop;
String[] shop=new String[20000];
void makedata(int x1,int y1,String file){
int w1,h1,mx,nx;
w1=700;
h1=700;
BufferedImage off = new BufferedImage(w1, h1, BufferedImage.TYPE_INT_BGR);
Graphics offsc = off.getGraphics();
offsc.setColor(Color.WHITE);
offsc.fillRect(0,0,700,700);
offsc.setColor(Color.RED);
offsc.fillRect(x1,y1,200,200);
offsc.dispose();
try {
ImageIO.write(off, "jpeg", new File(file));
} catch (IOException exception) { exception.printStackTrace(); }
}
}
最終更新:2016年04月05日 12:37