/** * Creates a new instance of AreaEffect */ public AbstractAreaEffect() { setBrushColor(Color.BLACK); setBrushSteps(10); setEffectWidth(8); setRenderInsideShape(false); setOffset(new Point(4,4)); setShouldFillShape(true); setShapeMasked(true); }
height = (int)(clipShape.getBounds2D().getHeight() + clipShape.getBounds2D().getY()); Rectangle effectBounds = new Rectangle(0,0, width + getEffectWidth()*2 + 1, height + getEffectWidth()*2 + 1); if (isShapeMasked()) { BufferedImage clipImage = getClipImage(effectBounds); Graphics2D g2 = clipImage.createGraphics(); g2.translate(getEffectWidth() - getOffset().getX(), getEffectWidth() - getOffset().getY()); paintBorderGlow(g2, clipShape, width, height); if (isRenderInsideShape()) { g.drawImage(clipImage, -getEffectWidth() + (int) getOffset().getX(), -getEffectWidth() + (int) getOffset().getY(), null); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); paintBorderGlow(g, clipShape, width, height);
Shape clipShape, int width, int height) { int steps = getBrushSteps(); float brushAlpha = 1f/steps; boolean inside = isRenderInsideShape(); g2.setPaint(getBrushColor()); if(isShouldFillShape()) {
public void updateEffectColorAndBrush(AbstractAreaEffect effect) { effect.setBrushColor(getColor()); int brushWidth = getBrushWidth(); effect.setEffectWidth(brushWidth); effect.setBrushSteps(calculateBrushSteps(brushWidth)); }
height = (int)(clipShape.getBounds2D().getHeight() + clipShape.getBounds2D().getY()); Rectangle effectBounds = new Rectangle(0,0, width + getEffectWidth()*2 + 1, height + getEffectWidth()*2 + 1); if (isShapeMasked()) { BufferedImage clipImage = getClipImage(effectBounds); Graphics2D g2 = clipImage.createGraphics(); g2.translate(getEffectWidth() - getOffset().getX(), getEffectWidth() - getOffset().getY()); paintBorderGlow(g2, clipShape, width, height); if (isRenderInsideShape()) { g.drawImage(clipImage, -getEffectWidth() + (int) getOffset().getX(), -getEffectWidth() + (int) getOffset().getY(), null); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); paintBorderGlow(g, clipShape, width, height);
Shape clipShape, int width, int height) { int steps = getBrushSteps(); float brushAlpha = 1f/steps; boolean inside = isRenderInsideShape(); g2.setPaint(getBrushColor()); if(isShouldFillShape()) {
/** * Creates a new instance of AreaEffect */ public AbstractAreaEffect() { setBrushColor(Color.BLACK); setBrushSteps(10); setEffectWidth(8); setRenderInsideShape(false); setOffset(new Point(4,4)); setShouldFillShape(true); setShapeMasked(true); }
height = (int)(clipShape.getBounds2D().getHeight() + clipShape.getBounds2D().getY()); Rectangle effectBounds = new Rectangle(0,0, width + getEffectWidth()*2 + 1, height + getEffectWidth()*2 + 1); if (isShapeMasked()) { BufferedImage clipImage = getClipImage(effectBounds); Graphics2D g2 = clipImage.createGraphics(); g2.translate(getEffectWidth() - getOffset().getX(), getEffectWidth() - getOffset().getY()); paintBorderGlow(g2, clipShape, width, height); if (isRenderInsideShape()) { g.drawImage(clipImage, -getEffectWidth() + (int) getOffset().getX(), -getEffectWidth() + (int) getOffset().getY(), null); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); paintBorderGlow(g, clipShape, width, height);
Shape clipShape, int width, int height) { int steps = getBrushSteps(); float brushAlpha = 1f/steps; boolean inside = isRenderInsideShape(); g2.setPaint(getBrushColor()); if(isShouldFillShape()) {
/** * Creates a new instance of AreaEffect */ public AbstractAreaEffect() { setBrushColor(Color.BLACK); setBrushSteps(10); setEffectWidth(8); setRenderInsideShape(false); setOffset(new Point(4,4)); setShouldFillShape(true); setShapeMasked(true); }
height = (int)(clipShape.getBounds2D().getHeight() + clipShape.getBounds2D().getY()); Rectangle effectBounds = new Rectangle(0,0, width + getEffectWidth()*2 + 1, height + getEffectWidth()*2 + 1); if (isShapeMasked()) { BufferedImage clipImage = getClipImage(effectBounds); Graphics2D g2 = clipImage.createGraphics(); g2.translate(getEffectWidth() - getOffset().getX(), getEffectWidth() - getOffset().getY()); paintBorderGlow(g2, clipShape, width, height); if (isRenderInsideShape()) { g.drawImage(clipImage, -getEffectWidth() + (int) getOffset().getX(), -getEffectWidth() + (int) getOffset().getY(), null); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); paintBorderGlow(g, clipShape, width, height);
Shape clipShape, int width, int height) { int steps = getBrushSteps(); float brushAlpha = 1f/steps; boolean inside = isRenderInsideShape(); g2.setPaint(getBrushColor()); if(isShouldFillShape()) {
/** * Creates a new instance of AreaEffect */ public AbstractAreaEffect() { setBrushColor(Color.BLACK); setBrushSteps(10); setEffectWidth(8); setRenderInsideShape(false); setOffset(new Point(4,4)); setShouldFillShape(true); setShapeMasked(true); }
height = (int) (clipShapeBounds.getHeight() + clipShapeBounds.getY()); Rectangle effectBounds = new Rectangle(0, 0, width + getEffectWidth() * 2 + 1, height + getEffectWidth() * 2 + 1); if (isShapeMasked()) { BufferedImage clipImage = getClipImage(effectBounds); Graphics2D g2 = clipImage.createGraphics(); g2.translate(getEffectWidth() - getOffset().getX(), getEffectWidth() - getOffset().getY()); paintBorderGlow(g2, clipShape, width, height); if (isRenderInsideShape()) { g.drawImage(clipImage, -getEffectWidth() + (int) getOffset().getX(), -getEffectWidth() + (int) getOffset().getY(), null); } else { g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); paintBorderGlow(g, clipShape, width, height);
Shape clipShape, int width, int height) { int steps = getBrushSteps(); float brushAlpha = 1f / steps; boolean inside = isRenderInsideShape(); g2.setPaint(getBrushColor()); if (isShouldFillShape()) {
/** * Creates a new instance of AreaEffect */ public AbstractAreaEffect() { setBrushColor(Color.BLACK); setBrushSteps(10); setEffectWidth(8); setRenderInsideShape(false); setOffset(new Point(4, 4)); setShouldFillShape(true); setShapeMasked(true); }