/** Creates a new instance of InnerGlowPathEffect */ public InnerGlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); setRenderInsideShape(true); }
@Test public void testInnerGlowPathEffect() { InnerGlowPathEffect effect = new InnerGlowPathEffect(); assertEquals(Color.WHITE, effect.getBrushColor()); assertEquals(10, effect.getBrushSteps()); assertEquals(10, effect.getEffectWidth()); assertEquals(new Point(0,0), effect.getOffset()); assertTrue(effect.isRenderInsideShape()); assertFalse(effect.isShouldFillShape()); } @Test
private void initInnerGlowPanel(AreaEffects effects) { boolean enable = false; Color color = WHITE; int width = 10; if (effects != null) { InnerGlowPathEffect effect = effects.getInnerGlowEffect(); if (effect != null) { enable = true; color = effect.getBrushColor(); width = effect.getEffectWidth(); } } if (innerGlowPanel == null) { // first initialization innerGlowPanel = new EffectWithWidthPanel( "Inner Glow", enable, color, width); } else { innerGlowPanel.setTabEnabled(enable); innerGlowPanel.setBrushWidth(width); innerGlowPanel.setColor(color, false); } }
private void updateInnerGlowFromGUI(AreaEffects effects) { InnerGlowPathEffect innerGlowEffect = null; if (innerGlowPanel.isSelected()) { innerGlowEffect = new InnerGlowPathEffect(innerGlowPanel.getOpacity()); innerGlowPanel.updateEffectColorAndBrush(innerGlowEffect); } effects.setInnerGlowEffect(innerGlowEffect); }
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 InnerGlowPathEffect */ public InnerGlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); setRenderInsideShape(true); }
/** Creates a new instance of InnerGlowPathEffect */ public InnerGlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); setRenderInsideShape(true); }
/** Creates a new instance of InnerGlowPathEffect */ public InnerGlowPathEffect() { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0,0)); setRenderInsideShape(true); }
/** * Creates a new instance of InnerGlowPathEffect */ public InnerGlowPathEffect(float opacity) { super(); setBrushColor(Color.WHITE); setBrushSteps(10); setEffectWidth(10); setShouldFillShape(false); setOffset(new Point(0, 0)); setRenderInsideShape(true); setOpacity(opacity); // opacity support added by lbalazscs }