/** * Returns a new map of hints with the same content than this map. * * @since 2.5 */ @Override public Hints clone() { return (Hints) super.clone(); }
/** * @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; }
this.exclusionLuminanceRanges = exclusionLuminanceRanges; RenderingHints localHints = (hints != null) ? (RenderingHints) hints.clone() : null; if ((localHints != null) && localHints.containsKey(JAI.KEY_IMAGE_LAYOUT)) { Object l = localHints.get(JAI.KEY_IMAGE_LAYOUT);
this.exclusionLuminanceRanges = exclusionLuminanceRanges; RenderingHints localHints = (hints != null) ? (RenderingHints) hints.clone() : null; if ((localHints != null) && localHints.containsKey(JAI.KEY_IMAGE_LAYOUT)) { Object l = localHints.get(JAI.KEY_IMAGE_LAYOUT);
/** * Gets a copy of the rendering hints. * * @return clone of table of rendering hints. */ public RenderingHints getRenderingHints() { return (RenderingHints) hints.clone(); }
/** * Returns a copy of the hints collection for this graphics context. * * @return A copy of the hints collection. */ @Override public RenderingHints getRenderingHints() { return (RenderingHints) this.hints.clone(); }
/** * Gets a copy of the rendering hints. * * @return clone of table of rendering hints. */ public RenderingHints getRenderingHints() { return (RenderingHints) hints.clone(); }
/** * Returns a copy of the rendering hints. Modifying the returned copy * will have no impact on the state of this {@code Graphics2D} instance. * * @return The rendering hints (never {@code null}). * * @see #setRenderingHints(java.util.Map) */ @Override public RenderingHints getRenderingHints() { return (RenderingHints) this.hints.clone(); }
/** * Returns a new map of hints with the same content than this map. * * @since 2.5 */ @Override public Hints clone() { return (Hints) super.clone(); }
/** * Returns a new map of hints with the same content than this map. * * @since 2.5 */ @Override public Hints clone() { return (Hints) super.clone(); }
/** * Returns a copy of the rendering hints. Modifying the returned copy * will have no impact on the state of this {@code Graphics2D} instance. * * @return The rendering hints (never {@code null}). * * @see #setRenderingHints(java.util.Map) */ @Override public RenderingHints getRenderingHints() { return (RenderingHints) this.hints.clone(); }
/** * Returns a copy of the rendering hints. Modifying the returned copy * will have no impact on the state of this {@code Graphics2D} * instance. * * @return The rendering hints (never {@code null}). * * @see #setRenderingHints(java.util.Map) */ @Override public RenderingHints getRenderingHints() { return (RenderingHints) this.hints.clone(); }
@Override public RenderingHints getRenderingHints() { return (RenderingHints) hints.clone(); }
/** Forces the provided {@link ColorModel} via the JAI ColorConvert operation. */ private void forceColorModel(final ColorModel cm) { final ImageLayout2 il = new ImageLayout2(image); il.setColorModel(cm); il.setSampleModel(cm.createCompatibleSampleModel(image.getWidth(), image.getHeight())); final RenderingHints oldRi = this.getRenderingHints(); final RenderingHints newRi = (RenderingHints) oldRi.clone(); newRi.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, il)); setRenderingHints(newRi); // Setting the parameter blocks ParameterBlock pb = new ParameterBlock(); pb.setSource(image, 0); pb.set(cm, 0); pb.set(roi, 1); pb.set(nodata, 2); if (isNoDataNeeded()) { if (background != null && background.length > 0) { // Elaborating the final NoData value if (background.length != cm.getNumColorComponents()) { throw new IllegalArgumentException("Wrong DestinationNoData value defined"); } pb.set(background, 3); } } image = JAI.create("ColorConvert", pb, getRenderingHints()); // restore RI this.setRenderingHints(oldRi); // invalidate stats invalidateStatistics(); }
final RenderingHints newRi = (RenderingHints) oldRi.clone(); newRi.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout)); try {
@Override protected GLGraphics2D clone() { try { GLGraphics2D clone = (GLGraphics2D) super.clone(); clone.parent = this; clone.hints = (RenderingHints) hints.clone(); return clone; } catch (CloneNotSupportedException exception) { throw new AssertionError(exception); } } }
@Override protected GLGraphics2D clone() { try { GLGraphics2D clone = (GLGraphics2D) super.clone(); clone.parent = this; clone.hints = (RenderingHints) hints.clone(); return clone; } catch (CloneNotSupportedException exception) { throw new AssertionError(exception); } } }
public GraphicsConfig(Graphics g) { myG = (Graphics2D)g; myHints = (Map)myG.getRenderingHints().clone(); myComposite = myG.getComposite(); }
@Override public Object clone() throws CloneNotSupportedException { GraphicsState clone = (GraphicsState) super.clone(); clone.hints = (RenderingHints) hints.clone(); clone.clip = GraphicsUtils.clone(clip); clone.transform = new AffineTransform(transform); return clone; }
final RenderingHints localHints; if (hints != null) { localHints = (RenderingHints) hints.clone(); localHints.add(new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout)); } else {