我正在使用 setScale 方法,但不知道如何禁用抗锯齿
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.effect.ImageInput;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.image.PixelReader;
import javafx.scene.image.WritableImage;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
import javax.swing.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("size");
Pane pane = new Pane();
FileInputStream inputStream = new FileInputStream("coal_block.png");
Image image = new Image(inputStream);
ImageView imageView = new ImageView(image);
imageView.setScaleX(100);
imageView.setScaleY(100);
imageView.setSmooth(false);
pane.getChildren().add(imageView);
Scene scene = new Scene(pane, 1024,768);
primaryStage.setScene(scene);
primaryStage.show();
}
}


