Examples of RenderingHints


Examples of java.awt.RenderingHints

        // Extract the affine transform.
        AffineTransform usr2dev = renderContext.getTransform();

        // Extract the hints.
  RenderingHints hints = renderContext.getRenderingHints();

  // Extract the AOI
        Shape aoi = renderContext.getAreaOfInterest();

        // Write serialized form to the stream.
View Full Code Here

Examples of java.awt.RenderingHints

 
  SerializableState aoi = (SerializableState)in.readObject();
  Shape shape = (Shape)aoi.getObject();

  SerializableState rhs = (SerializableState)in.readObject();
        RenderingHints hints = (RenderingHints)rhs.getObject();

        // Restore the transient RenderContext.
  renderContext = new RenderContext(usr2dev, shape, hints);
        theObject = renderContext;
    }
View Full Code Here

Examples of java.awt.RenderingHints

    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

Examples of java.awt.RenderingHints

    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

Examples of java.awt.RenderingHints

          } 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

Examples of java.awt.RenderingHints

      */
    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

Examples of java.awt.RenderingHints

    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

Examples of java.awt.RenderingHints

                 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

Examples of java.awt.RenderingHints

             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

Examples of java.awt.RenderingHints

                                             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
TOP
Copyright © 2018 www.massapi.com. 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.