public interface ExtendedGraphics2D
Graphics2D to allow to keep the original Node structure. For example, a SVG Graphics2D converter might
create a "g" Node for each Node in the tree to regroup its children.
Graphics2DConverter does not use this interface by default when converting a Node tree. However,
it is possible to use a ConverterListener to process specificaly the Groups.
An example of usage could be:
public void startNode(Graphics2D g2D, Node node) {
if (node instanceof Parent) {
if (g2D instanceof ExtendedGraphics2D) {
ExtendedGraphics2D group2D = (ExtendedGraphics2D)g2D;
group2D.startGroup(node.getId(), node);
}
}
}
public void endNode(Graphics2D g2D, Node node) {
if (node instanceof Parent) {
if (g2D instanceof ExtendedGraphics2D) {
ExtendedGraphics2D group2D = (ExtendedGraphics2D)g2D;
group2D.endGroup(node);
}
}
}
| Modifier and Type | Method and Description |
|---|---|
default void |
applyEffect(javafx.scene.Node node,
javafx.scene.effect.Effect effect)
Apply an Effect on the next graphics object to be rendered.
|
default void |
endGroup(javafx.scene.Node node)
End a Group.
|
default void |
startGroup(java.lang.String name,
javafx.scene.Node node)
Start a Group.
|
default void startGroup(java.lang.String name,
javafx.scene.Node node)
name - the group namenode - the Nodedefault void endGroup(javafx.scene.Node node)
node - the Nodedefault void applyEffect(javafx.scene.Node node,
javafx.scene.effect.Effect effect)
node - the Nodeeffect - the EffectCopyright © 2021, 2022, 2025, 2026 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence