Simple GIS

GISプログラムの練習

眉毛

package face8;

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.scene.Group;
import javafx.scene.image.*;
import javafx.scene.shape.Rectangle;
import javafx.scene.image.Image;
import javafx.scene.paint.Color;
import javafx.scene.shape.Polygon;
import javafx.scene.shape.Line;

public class pro extends Application {
    
    Image img;
    ImageView imv;
    Rectangle reye,leye,box; 
    int rx,ry,lx,ly;
    int bx,by,bw,bh;
    int facenumber;
    int fx=new int[500];
int fy=new int[500];

int brnumber;
  int brx=new int[500];
int bry=new int[500];  
int blnumber;
  int blx=new int[500];
int bly=new int[500]; 

int s,sx,w,h;    
int memor=new int[1000][1000]; 
int memog=new int[100][1000]; 
int memob=new int[1000][1000];


Rectangle rec=new Rectangle[500];
Line bline=new Line[500];


     Rectangle[] point=new Rectangle[500]; 

    public static void main(String args) {
        launch(args);
    }
    
    
    @Override
public void start(Stage primaryStage) {

        String pic;
        
        pic="http://img.ske48.co.jp/profile/large/takayanagi_akane.jpg";
        
        catchdata sub2=new catchdata();
        sub2.makedata(pic);
        brx=sub2.brx;
        bry=sub2.bry;
        brnumber=sub2.brnumber;
      blx=sub2.blx;
        bly=sub2.bly;
        blnumber=sub2.blnumber;
        
        w=300;
        h=365;

        
        for(s=1;s<blnumber;s++){
        bline[s]=new Line(blx[s]+50,bly[s]+50,blx[s+1]+50,bly[s+1]+50);
        }
        s=blnumber;
        bline[brnumber]=new Line(blx[s]+50,bly[s]+50,blx[1]+50,bly[1]+50);
        
        
        
img = new Image(pic);
imv = new ImageView(img);
imv.setFitWidth(300);
imv.setFitHeight(365);
imv.setLayoutX(50);
imv.setLayoutY(50);

Group root = new Group();
Scene scene = new Scene(root, 500, 500);
        
root.getChildren().add(imv);

 for(s=1;s<brnumber+1;s++){
 root.getChildren().add(bline[s]);
 }
        

primaryStage.setTitle("face");
primaryStage.setScene(scene);
primaryStage.show();
    }

}