Package java.awt

Examples of java.awt.RenderingHints$Key


    private static Map configHelper(Map configuration) {

  Map config;

  if (configuration == null) {
      config = new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,
          Boolean.TRUE);
  } else {
     
      config = configuration;

      // If the user specified a value for this hint, we don't
      // want to change that
      if (!config.containsKey(JAI.KEY_REPLACE_INDEX_COLOR_MODEL)) {
    RenderingHints hints = new RenderingHints(null);
    // This is effectively a clone of configuration
    hints.putAll(configuration);
    config = hints;
    config.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.TRUE);
      }
  }
View Full Code Here


    oldValue = oldParameters;
    newValue = newParameters;

      } else if (propName.equals("renderinghints")) {

    RenderingHints oldRH = (RenderingHints)event.getOldValue();
    RenderingHints newRH = (RenderingHints)event.getNewValue();

    oldValue = SerializerFactory.getState(oldRH, null);
    newValue = SerializerFactory.getState(newRH, null);
      } else {
    throw new RemoteImagingException(
View Full Code Here

          } catch (Exception e) {
        throw new RuntimeException(e.getMessage());
          }
         
          SerializableState ss = (SerializableState)obj;
          RenderingHints rh = (RenderingHints)ss.getObject();
         
          ri = source.createScaledRendering(w, h, rh);
      }

      if (useTileCodec) {
View Full Code Here

      */
    private void writeObject(ObjectOutputStream out) throws IOException {
        out.defaultWriteObject();
        if (theImage != null) {
            out.writeBoolean(true);
            RenderingHints hints = new RenderingHints(null);
            hints.put(JAI.KEY_SERIALIZE_DEEP_COPY, new Boolean(true));
            out.writeObject(SerializerFactory.getState(theImage, hints));
        } else {
            out.writeBoolean(false);
        }
    }
View Full Code Here

    public void createRenderedOp(Long id, String opName,
         ParameterBlock pb,
         SerializableState hints)
  throws RemoteException {

  RenderingHints rh = (RenderingHints)hints.getObject();

  // Check whether any of the parameters are Strings which represent
  // images either on this server or another server.
  JAIRMIUtil.checkServerParameters(pb, nodes);
View Full Code Here

                 int h,
                 SerializableState hintsState)
  throws RemoteException {

  RenderableImage ri = (RenderableImage)nodes.get(id);
  RenderingHints hints = (RenderingHints)hintsState.getObject();
  RenderedImage rendering = ri.createScaledRendering(w, h, hints);
  if (rendering instanceof Serializable) {
      return rendering;
  } else {
      return new SerializableRenderedImage(rendering);
View Full Code Here

             SerializableState oldRHints,
             ParameterBlock newParamBlock,
             SerializableState newRHints)
  throws RemoteException {

  RenderingHints oldHints = (RenderingHints)oldRHints.getObject();
  RenderingHints newHints = (RenderingHints)newRHints.getObject();

  RenderedOp op = (RenderedOp)nodes.get(id);

  OperationDescriptor od = (OperationDescriptor)
      JAI.getDefaultInstance().getOperationRegistry().
View Full Code Here

                                             DEFAULT_KERNEL_1D,
                                             DEFAULT_KERNEL_1D);
            pb.add(kernel);
            BorderExtender extender =
                BorderExtender.createInstance(BorderExtender.BORDER_COPY);
            RenderingHints hints =
                JAI.getDefaultInstance().getRenderingHints();
            if(hints == null) {
                hints = new RenderingHints(JAI.KEY_BORDER_EXTENDER, extender);
            } else {
                hints.put(JAI.KEY_BORDER_EXTENDER, extender);
            }
                                  
            RenderedOp filter = new RenderedOp("convolve", pb, hints);

            // Add the subsampling operation.
View Full Code Here

                       TileCache cache,
                       int computeType,
                       ImageLayout layout) {
        this(source, layout,
             cache != null ?
             new RenderingHints(JAI.KEY_TILE_CACHE, cache) : null,
             computeType);
    }
View Full Code Here

        Map config;

        if (configuration == null) {

            config = new RenderingHints(JAI.KEY_REPLACE_INDEX_COLOR_MODEL,
                                        Boolean.FALSE);

        } else {

            config = configuration;

      // If the user has specified a hint for this, then we don't
      // want to change it, so change only if this hint is not
      // already specified
            if (!(config.containsKey(JAI.KEY_REPLACE_INDEX_COLOR_MODEL))) {
                RenderingHints hints = (RenderingHints)configuration;
                config = (RenderingHints)hints.clone();
                config.put(JAI.KEY_REPLACE_INDEX_COLOR_MODEL, Boolean.FALSE);
            }
        }

        return config;
View Full Code Here

TOP

Related Classes of java.awt.RenderingHints$Key

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.