Java 类javafx.scene.effect.ImageInput 实例源码

项目:metastone    文件:DigitFactory.java   
private static void applyFontColor(ImageView image, Color color) {
    ColorAdjust monochrome = new ColorAdjust();
    monochrome.setSaturation(-1.0);
    Effect colorInput = new ColorInput(0, 0, image.getImage().getWidth(), image.getImage().getHeight(), color);
    Blend blend = new Blend(BlendMode.MULTIPLY, new ImageInput(image.getImage()), colorInput);
    image.setClip(new ImageView(image.getImage()));
    image.setEffect(blend);
    image.setCache(true);
}