/** * Provides a hint that this {@link ImageWorker} will no longer be accessed from a reference in * user space. The results are equivalent to those that occur when the program loses its last * reference to this image, the garbage collector discovers this, and finalize is called. This * can be used as a hint in situations where waiting for garbage collection would be overly * conservative. * * <p>Mind, this also results in disposing the JAI Image chain attached to the image the worker * is applied to, so don't call this method on image changes (full/partial) that you want to * use. * * <p>{@link ImageWorker} defines this method to remove the image being disposed from the list * of sinks in all of its source images. The results of referencing an {@link ImageWorker} after * a call to dispose() are undefined. */ public final void dispose() { if (commonHints != null) { this.commonHints.clear(); } this.commonHints = null; this.roi = null; if (this.image instanceof PlanarImage) { ImageUtilities.disposePlanarImageChain(PlanarImage.wrapRenderedImage(image)); } else if (this.image instanceof BufferedImage) { ((BufferedImage) this.image).flush(); this.image = null; } }
/** * @see Graphics2D#setRenderingHints(Map) */ public void setRenderingHints(Map hints) { rhints.clear(); rhints.putAll(hints); }
/** * Sets the rendering hints to the specified collection. * * @param hints the new set of hints ({@code null} not permitted). * * @see #getRenderingHints() */ @Override public void setRenderingHints(Map<?, ?> hints) { this.hints.clear(); this.hints.putAll(hints); }
/** * Sets the rendering hints to the specified collection. * * @param hints the new set of hints ({@code null} not permitted). * * @see #getRenderingHints() */ @Override public void setRenderingHints(Map<?, ?> hints) { this.hints.clear(); addRenderingHints(hints); }
/** * Sets the rendering hints to the specified collection. * * @param hints the new set of hints ({@code null} not permitted). * * @see #getRenderingHints() */ @Override public void setRenderingHints(Map<?, ?> hints) { this.hints.clear(); addRenderingHints(hints); }
/** * @see Graphics2D#setRenderingHints(Map) */ public void setRenderingHints(Map hints) { rhints.clear(); rhints.putAll(hints); }
/** * @see Graphics2D#setRenderingHints(Map) */ @Override public void setRenderingHints( final Map hints ) { rhints.clear(); rhints.putAll( hints ); }
/** * @see Graphics2D#setRenderingHints(Map) */ @Override public void setRenderingHints(Map<?,?> hints) { rhints.clear(); rhints.putAll(hints); if (dg2 != null) { dg2.setRenderingHints(hints); } }
@Override public void setRenderingHints(Map<?, ?> hints) { if (isDisposed()) { return; } state.getHints().clear(); for (Entry<?, ?> hint : hints.entrySet()) { setRenderingHint((Key) hint.getKey(), hint.getValue()); } }
@Override public void setRenderingHints(Map<?, ?> hints) { // for getRenderingHint() and getRenderingHints() this.renderingHints.clear(); // Needs to clear first this.renderingHints.putAll(hints); // Only overrides existing keys if (isPaintingEnabled) { notSupportedWarn(); } }
savedHints.clear();
/** * Sets table of rendering hints. * * @param hints table to be set */ public void setRenderingHints(Map<?, ?> hints) { this.hints.clear(); if (hints instanceof RenderingHints) { RenderingHints renderingHints = (RenderingHints)hints; this.hints.putAll((Map<?, ?>)renderingHints.clone()); } else { this.hints.putAll(hints); } }
/** * Sets table of rendering hints. * * @param hints table to be set */ public void setRenderingHints(Map<?, ?> hints) { this.hints.clear(); if (hints instanceof RenderingHints) { RenderingHints renderingHints = (RenderingHints)hints; this.hints.putAll((Map<?, ?>)renderingHints.clone()); } else { this.hints.putAll(hints); } }
/** * Provides a hint that this {@link ImageWorker} will no longer be accessed from a reference in * user space. The results are equivalent to those that occur when the program loses its last * reference to this image, the garbage collector discovers this, and finalize is called. This * can be used as a hint in situations where waiting for garbage collection would be overly * conservative. * <p> * Mind, this also results in disposing the JAI Image chain attached to the image the * worker is applied to, so don't call this method on image changes (full/partial) that * you want to use. * <p> * {@link ImageWorker} defines this method to remove the image being disposed from the list of * sinks in all of its source images. The results of referencing an {@link ImageWorker} after a * call to dispose() are undefined. */ public final void dispose() { if(commonHints != null) { this.commonHints.clear(); } this.commonHints = null; this.roi = null; if (this.image instanceof PlanarImage) { ImageUtilities.disposePlanarImageChain(PlanarImage.wrapRenderedImage(image)); } else if (this.image instanceof BufferedImage) { ((BufferedImage) this.image).flush(); this.image = null; } }
@Override public void setTransform(AffineTransform Tx) {this.transform = Tx;} @Override public void setStroke(Stroke s) {this.stroke = s;} @Override public void setRenderingHints(Map<?, ?> hints) {this.renderingHints.clear(); this.renderingHints.putAll(hints);} @Override public void setRenderingHint(Key hintKey, Object hintValue) {this.renderingHints.put(hintKey, hintValue);} @Override public void setPaint(Paint paint) {this.paint = paint;}
renderingHints.clear(); renderingHints.put(JAI.KEY_IMAGE_LAYOUT, imageLayout);