/** * Removes a rendering hint. Note that invoking this method is <strong>not</strong> the same * than invoking <code>{@linkplain #setRenderingHint setRenderingHint}(key, null)</code>. This * is especially true for the {@linkplain javax.media.jai.TileCache tile cache} hint: * * <p> * * <ul> * <li><code>{@linkplain #setRenderingHint setRenderingHint}({@linkplain JAI#KEY_TILE_CACHE}, * null)</code> disables the use of any tile cache. In other words, this method call do * request a tile cache, which happen to be the "null" cache. * <li><code>removeRenderingHint({@linkplain JAI#KEY_TILE_CACHE})</code> unsets any tile cache * specified by a previous rendering hint. All images to be computed after this method * call will save their tiles in the {@linkplain JAI#getTileCache JAI default tile cache}. * </ul> * * @return This ImageWorker */ public final ImageWorker removeRenderingHint(final RenderingHints.Key key) { if (commonHints != null) { commonHints.remove(key); } return this; }
/** * @param hints * @return */ private RenderingHints prepareHints(RenderingHints hints) { if (hints == null) { hints = new Hints(); } else { hints = (RenderingHints) hints.clone(); } hints.remove(JAI.KEY_IMAGE_LAYOUT); // remove an eventual layout passed down to us return hints; }
/** * Removes a rendering hint. Note that invoking this method is <strong>not</strong> the same * than invoking <code>{@linkplain #setRenderingHint setRenderingHint}(key, null)</code>. * This is especially true for the {@linkplain javax.media.jai.TileCache tile cache} hint: * <p> * <ul> * <li><code>{@linkplain #setRenderingHint setRenderingHint}({@linkplain JAI#KEY_TILE_CACHE}, * null)</code> disables the use of any tile cache. In other words, this method call do * request a tile cache, which happen to be the "null" cache.</li> * * <li><code>removeRenderingHint({@linkplain JAI#KEY_TILE_CACHE})</code> unsets any tile cache * specified by a previous rendering hint. All images to be computed after this method * call will save their tiles in the {@linkplain JAI#getTileCache JAI default tile * cache}.</li> * </ul> * * @return This ImageWorker */ public final ImageWorker removeRenderingHint(final RenderingHints.Key key) { if (commonHints != null) { commonHints.remove(key); } return this; }
/** * Removes a rendering hint. Note that invoking this method is <strong>not</strong> the same * than invoking <code>{@linkplain #setRenderingHint setRenderingHint}(key, null)</code>. * This is especially true for the {@linkplain javax.media.jai.TileCache tile cache} hint: * <p> * <ul> * <li><code>{@linkplain #setRenderingHint setRenderingHint}({@linkplain JAI#KEY_TILE_CACHE}, * null)</code> disables the use of any tile cache. In other words, this method call do * request a tile cache, which happen to be the "null" cache.</li> * * <li><code>removeRenderingHint({@linkplain JAI#KEY_TILE_CACHE})</code> unsets any tile cache * specified by a previous rendering hint. All images to be computed after this method * call will save their tiles in the {@linkplain JAI#getTileCache JAI default tile * cache}.</li> * </ul> * * @return This ImageWorker */ public final ImageWorker removeRenderingHint(final RenderingHints.Key key) { if (commonHints != null) { commonHints.remove(key); } return this; }
warpingHints.remove(JAI.KEY_IMAGE_LAYOUT);
/** Define a rendering hint. */ public void setRenderingHint(RenderingHints.Key key,Object value) { if(value==null) renderingHints.remove(key); renderingHints.put(key, value); }
public static Map<Object, Object> setHints(Graphics2D g, Map<Object, Object> hints) { final RenderingHints rhints = g.getRenderingHints(); for (final Map.Entry<Object, Object> entry : hints.entrySet()) { if (!(entry.getKey() instanceof RenderingHints.Key)) { continue; } final RenderingHints.Key key = (RenderingHints.Key) entry.getKey(); final Object value = rhints.get(key); if (entry.getValue() == null) { rhints.remove(key); } else { rhints.put(key, entry.getValue()); } entry.setValue(value); } return hints; }
/** * Sets a rendering hint * @param hintKey * @param hintValue */ @Override public void setRenderingHint(Key hintKey, Object hintValue) { if (hintValue != null) { rhints.put(hintKey, hintValue); } else { if (hintKey instanceof HyperLinkKey) { rhints.put(hintKey, HyperLinkKey.VALUE_HYPERLINKKEY_OFF); } else { rhints.remove(hintKey); } } if (dg2 != null) { dg2.setRenderingHint(hintKey, hintValue); } }
/** * Sets a rendering hint * @param arg0 * @param arg1 */ public void setRenderingHint(Key arg0, Object arg1) { if (arg1 != null) { rhints.put(arg0, arg1); } else { if (arg0 instanceof HyperLinkKey) { rhints.put(arg0, HyperLinkKey.VALUE_HYPERLINKKEY_OFF); } else { rhints.remove(arg0); } } }
/** * Sets a rendering hint * @param arg0 * @param arg1 */ public void setRenderingHint(Key arg0, Object arg1) { if (arg1 != null) { rhints.put(arg0, arg1); } else { if (arg0 instanceof HyperLinkKey) { rhints.put(arg0, HyperLinkKey.VALUE_HYPERLINKKEY_OFF); } else { rhints.remove(arg0); } } }
oldBufferedImage); else g2d.getRenderingHints().remove(RenderingHintsKeyExt.KEY_BUFFERED_IMAGE);
if (hints.remove(key) != null) { clearCache();
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue) { // store hints if (hintValue != null) { hints.put(hintKey, hintValue); } else { hints.remove(hintKey); } // RenderingHints --> String String key = JAVAArrayMap.HINTS.get(hintKey); if (key == null) { out.println("System.err.println(\"" + getClass() + ": setRenderingHint(RenderingHints.Key, Object) key not supported '" + hintKey + "'.\");"); return; } String value = JAVAArrayMap.HINTS.get(hintValue); if (value == null) { out.println("System.err.println(\"" + getClass() + ": setRenderingHint(RenderingHints.Key, Object) key not supported '" + hintKey + "'.\");"); return; } // write out imports.add("java.awt.RenderingHints"); out.print(vg() + ".setRenderingHint("); out.print(key); out.print(", "); out.print(value); out.println(");"); }
warpingHints.remove(JAI.KEY_IMAGE_LAYOUT);
warpingHints.remove(JAI.KEY_IMAGE_LAYOUT);
scalingHints.remove(JAI.KEY_IMAGE_LAYOUT); scalingHints.put(JAI.KEY_BORDER_EXTENDER, extender);
scalingHints.remove(JAI.KEY_IMAGE_LAYOUT); scalingHints.put(JAI.KEY_BORDER_EXTENDER, extender);
if (hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) { hints = new RenderingHints((Map) renderingHints); hints.remove(JAI.KEY_TILE_CACHE);
if (hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) { hints = new RenderingHints((Map) renderingHints); hints.remove(JAI.KEY_TILE_CACHE);
renderHints.remove(JAI.KEY_TILE_CACHE);