private void updateGlowFromGUI(AreaEffects effects) { GlowPathEffect glowEffect = null; if (glowPanel.isSelected()) { glowEffect = new GlowPathEffect(glowPanel.getOpacity()); glowPanel.updateEffectColorAndBrush(glowEffect); } effects.setGlowEffect(glowEffect); }
public static AreaEffects createRandom(Random rand) { AreaEffects ae = new AreaEffects(); float f = rand.nextFloat(); if(f < 0.25f) { ae.setNeonBorderEffect(new NeonBorderEffect()); } else if(f < 0.5f) { ae.setDropShadowEffect(new ShadowPathEffect(1.0f)); } else if(f < 0.75f) { ae.setInnerGlowEffect(new InnerGlowPathEffect(1.0f)); } else { ae.setGlowEffect(new GlowPathEffect(1.0f)); } return ae; }
@Test public void testGlowPathEffect() { GlowPathEffect effect = new GlowPathEffect(); assertEquals(Color.WHITE, effect.getBrushColor()); assertEquals(10, effect.getBrushSteps()); assertEquals(10, effect.getEffectWidth()); assertEquals(new Point(0,0), effect.getOffset()); assertFalse(effect.isRenderInsideShape()); assertFalse(effect.isShouldFillShape()); } @Test