day1.3 点线面

点线面渐进介绍


  1. 在图形的进化过程中,点这个类别是作为图形构建的基础。但是在JavaFX8的引进后,弃用了这个类别。

划线方便以后理解阐述原因。

  1. 线
    设计流程:
    这里写图片描述

代码:

public class Day1_1_line extends Application {

    @Override
    public void start(Stage stage) throws Exception {
        // TODO Auto-generated method stub
        VBox box = new VBox();
        Scene scene = new Scene(box, 300, 250);

        scene.setFill(null);
        Line line = new Line(0, 0, 80, 200);
        box.getChildren().add(line);

        stage.setTitle("线的设计");
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

下面开始测试线的属性:
不知道什么鬼,涉及到paint,这是个啥???不能用Color类。

猜你喜欢

转载自blog.csdn.net/lightiff/article/details/72802587