@Override public void render (final EditableImage image) { image.execute2(new DrawOp(new DrawOp.Executor() { @Override public void draw (final Graphics2D g, final EditableImage image) { attributes.drawRectangle(g, image); } })); }
@Override public void render (final EditableImage image) { image.execute2(new DrawOp(new DrawOp.Executor() { @Override public void draw (final Graphics2D g, final EditableImage image) { attributes.drawString(g, image, text); } })); }
/******************************************************************************* * * Flush all image caches. * ******************************************************************************/ public void flushAllCaches() { logger.info("flushAllCaches()"); logger.info(">>>> all caches will be recomputed from: " + image); flushScaledImageCache(); if (image != null) { optimizedImage = optimizedImageEnabled ? image.execute2(new OptimizeOp()) : image; } else { optimizedImage = null; } }
/******************************************************************************* * * Executes an operation adding the elapsed time to the statistics. * * @param image the image to process * @param operation the operation to execute * @param operationName the name used for the statistics * @return the result * *******************************************************************************/ protected EditableImage execute2 (EditableImage image, Operation operation, String operationName) { final EditableImage result = image.execute2(operation); result.setNickName(operationName); registerTime(operationName, result); return result; }
scaledImage = optimizedImage.execute2(new ScaleOp(scale, getScaleQuality()));