学习记录-慢慢完善
官方文档:
The abstract base class for all effect implementations. An effect is a graphical algorithm that produces an image, typically as a modification of a source image. An effect can be associated with a scene graph by setting the Node.effect attribute. Some effects change the color properties of the source pixels (such as ColorAdjust), others combine multiple images together (such as Blend), while still others warp or move the pixels of the source image around (such as DisplacementMap or PerspectiveTransform). All effects have at least one input defined and the input can be set to another effect to chain the effects together and combine their results, or it can be left unspecified in which case the effect will operate on a graphical rendering of the node it is attached to. Node
谷歌汉化:
所有效果实现的抽象基类。效果是生成图像的图形算法,通常作为源图像的修改。通过设置Node.effect属性,可以将效果与场景图相关联。某些效果会更改源像素的颜色属性(例如ColorAdjust),其他效果会将多个图像组合在一起(例如Blend),而还有一些效果会扭曲或移动源图像的像素(例如DisplacementMap或PerspectiveTransform)。所有效果都至少定义了一个输入,并且可以将输入设置为另一个效果,以将效果链接在一起并组合其结果,或者可以不指定效果,在这种情况下,效果将对其附加到的节点的图形呈现进行操作。Node
在JavaFX中,效果是一种应用于节点以在视觉上增强其外观的算法。
Node类的Effect属性用于指定效果。
这些效果中的每一个都由一个类表示,所有这些类都可以在名为javafx.scene.effect的包中找到。
将效果应用于节点
您可以使用setEffect()方法将效果应用于节点。 对于此方法,您需要传递效果的对象。
要将效果应用于节点,您需要创建节点。
实例化需要应用的效果的相应类。
设置效果的属性。
使用setEffect()方法将效果应用于节点
Bloom (发光效果)
根据可配置的阈值ÿ