When upgrading from 2.1b18 to 2.2b3 a "neon" effect applied to a HBox with a few labels in it seems to be rendered at the wrong scale.
The HBox has some CSS applied to make it appear 1.5x larger (without it taking up more layout room). The applied neon effect seems to be even larger still (from what it looks like another 1.5x larger). When no scaling is applied to the HBox node, the effect renders as expected. Here's the CSS applied to the HBox, removing the scale components solves the rendering issue:
.program-name {
-fx-padding: 0 40 0 30;
-fx-scale-x: 1.5;
-fx-scale-y: 1.5;
}
And the neon-effect (note that even just applying the first DropShadow already exhibits this behaviour):
public static Effect createNeonEffect(final double size) { // font point size
return new Blend() {{
setMode(BlendMode.MULTIPLY);
setBottomInput(new DropShadow() {{
setColor(Color.rgb(254, 235, 66, 0.3));
setOffsetX(size / 22);
setOffsetY(size / 22);
setSpread(0.2);
}});
setTopInput(new Blend() {{
setMode(BlendMode.MULTIPLY);
setBottomInput(new DropShadow() {{
setColor(Color.web("#f13a00"));
setRadius(size / 5.5);
setSpread(0.2);
}});
setTopInput(new Blend() {{
setMode(BlendMode.MULTIPLY);
setBottomInput(new InnerShadow() {{
setColor(Color.web("#feeb42"));
setRadius(size / 12);
setChoke(0.8);
}});
setTopInput(new InnerShadow() {{
setColor(Color.web("#f13a00"));
setRadius(size / 22);
setChoke(0.4);
}});
}});
}});
}};
}
The HBox has some CSS applied to make it appear 1.5x larger (without it taking up more layout room). The applied neon effect seems to be even larger still (from what it looks like another 1.5x larger). When no scaling is applied to the HBox node, the effect renders as expected. Here's the CSS applied to the HBox, removing the scale components solves the rendering issue:
.program-name {
-fx-padding: 0 40 0 30;
-fx-scale-x: 1.5;
-fx-scale-y: 1.5;
}
And the neon-effect (note that even just applying the first DropShadow already exhibits this behaviour):
public static Effect createNeonEffect(final double size) { // font point size
return new Blend() {{
setMode(BlendMode.MULTIPLY);
setBottomInput(new DropShadow() {{
setColor(Color.rgb(254, 235, 66, 0.3));
setOffsetX(size / 22);
setOffsetY(size / 22);
setSpread(0.2);
}});
setTopInput(new Blend() {{
setMode(BlendMode.MULTIPLY);
setBottomInput(new DropShadow() {{
setColor(Color.web("#f13a00"));
setRadius(size / 5.5);
setSpread(0.2);
}});
setTopInput(new Blend() {{
setMode(BlendMode.MULTIPLY);
setBottomInput(new InnerShadow() {{
setColor(Color.web("#feeb42"));
setRadius(size / 12);
setChoke(0.8);
}});
setTopInput(new InnerShadow() {{
setColor(Color.web("#f13a00"));
setRadius(size / 22);
setChoke(0.4);
}});
}});
}});
}};
}