/** * Creates a new instance of GlowPathEffect */ public GlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); }
@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
private void initGlowPanel(AreaEffects effects) { boolean enable = false; Color color = WHITE; int width = 10; if (effects != null) { GlowPathEffect effect = effects.getGlowEffect(); if (effect != null) { enable = true; color = effect.getBrushColor(); width = effect.getEffectWidth(); } } if (glowPanel == null) { // first initialization glowPanel = new EffectWithWidthPanel( "Glow", enable, color, width); } else { glowPanel.setTabEnabled(enable); glowPanel.setBrushWidth(width); glowPanel.setColor(color, false); } }
private void updateGlowFromGUI(AreaEffects effects) { GlowPathEffect glowEffect = null; if (glowPanel.isSelected()) { glowEffect = new GlowPathEffect(glowPanel.getOpacity()); glowPanel.updateEffectColorAndBrush(glowEffect); } effects.setGlowEffect(glowEffect); }
int effectWidth = glowEffect.getEffectWidth(); if (effectWidth > max) { max = effectWidth;
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; }
/** * Creates a new instance of GlowPathEffect */ public GlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); }
/** * Creates a new instance of GlowPathEffect */ public GlowPathEffect(float opacity) { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0, 0)); setOpacity(opacity); // opacity support added by lbalazscs }
/** * Creates a new instance of GlowPathEffect */ public GlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); }
/** * Creates a new instance of GlowPathEffect */ public GlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); }