Package java.awt.image.renderable

Examples of java.awt.image.renderable.RenderContext


        // Create the renderable-to-rendered scaling.
        AffineTransform transform = AffineTransform.getScaleInstance(sx, sy);

        // Return the rendering applying the computed transform.
        return createRendering(new RenderContext(transform));
    }
View Full Code Here


        }
        double sx = (double)w/getWidth();
        double sy = (double)h/getHeight();
       
  AffineTransform usr2dev = AffineTransform.getScaleInstance(sx, sy);
        RenderContext renderContext = new RenderContext(usr2dev, hints);
        return createRendering(renderContext);
    }
View Full Code Here

            // is a rendered source in the ParameterBlock.

            // If there are any hints set on the node, create a new
            // RenderContext which merges them with those in the RenderContext
            // passed in with the passed in hints taking precedence.
            RenderContext rcIn = renderContext;
            RenderingHints nodeHints = nodeSupport.getRenderingHints();
            if(nodeHints != null) {
                RenderingHints hints = renderContext.getRenderingHints();
                RenderingHints mergedHints =
                    JAI.mergeRenderingHints(nodeHints, hints);
                if(mergedHints != hints) {
                    rcIn = new RenderContext(renderContext.getTransform(),
                                             renderContext.getAreaOfInterest(),
                                             mergedHints);
                }
            }

            if (sources != null) {
                Vector renderedSources = new Vector();
                for (int i = 0; i < sources.size(); i++) {
                    RenderContext rcOut =
                        crif.mapRenderContext(i, rcIn,
                                              renderedPB,
                                              this);
                    RenderableImage src =
                        (RenderableImage)sources.elementAt(i);
View Full Code Here

            throw new
    IllegalArgumentException(JaiI18N.getString("RemoteImage1"));
        }

  if (renderContext == null) {
      renderContext = new RenderContext(new AffineTransform());
  }

        // Construct the remote RMI image.
        getRMIImage(serverName);
View Full Code Here

        float trans_y = paramBlock.getFloatParameter(3);

        AffineTransform scale = new AffineTransform(scale_x, 0.0, 0.0, scale_y,
                                                    trans_x, trans_y);

        RenderContext RC = (RenderContext)renderContext.clone();
        AffineTransform usr2dev = RC.getTransform();
        usr2dev.concatenate(scale);
  RC.setTransform(usr2dev);
  return RC;
    }
View Full Code Here

        double scaleY = paramBlock.getDoubleParameter(1);

        AffineTransform scale =
            new AffineTransform(scaleX, 0.0, 0.0, scaleY, 0.0, 0.0);

        RenderContext RC = (RenderContext)renderContext.clone();
        AffineTransform usr2dev = RC.getTransform();
        usr2dev.concatenate(scale);
  RC.setTransform(usr2dev);
  return RC;
    }
View Full Code Here

        float angle = paramBlock.getFloatParameter(2);

        AffineTransform rotate =
            AffineTransform.getRotateInstance(angle, x_center, y_center);

        RenderContext RC = (RenderContext)renderContext.clone();
        AffineTransform usr2dev = RC.getTransform();
        usr2dev.concatenate(rotate);
  RC.setTransform(usr2dev);
  return RC;
    }
View Full Code Here

        float scale_y = paramBlock.getFloatParameter(1);

        AffineTransform scale = new AffineTransform(scale_x, 0.0, 0.0, scale_y,
                                                    0.0, 0.0);

        RenderContext RC = (RenderContext)renderContext.clone();
        AffineTransform usr2dev = RC.getTransform();
        usr2dev.concatenate(scale);
  RC.setTransform(usr2dev);
  return RC;
    }
View Full Code Here

            ParameterBlock paramBlock,
            RenderableImage image) {
        Object arg0 = paramBlock.getObjectParameter(0);
        AffineTransform affine = (AffineTransform)arg0;

        RenderContext RC = (RenderContext)renderContext.clone();
        AffineTransform usr2dev = RC.getTransform();
        usr2dev.concatenate(affine);
  RC.setTransform(usr2dev);
  return RC;
    }
View Full Code Here

            RenderableImage image) {
  AffineTransform translate = new AffineTransform();
  translate.setToTranslation(paramBlock.getFloatParameter(0),
           paramBlock.getFloatParameter(1));

        RenderContext RC = (RenderContext)renderContext.clone();
        AffineTransform usr2dev = RC.getTransform();
        usr2dev.concatenate(translate);
  RC.setTransform(usr2dev);
  return RC;
    }
View Full Code Here

TOP

Related Classes of java.awt.image.renderable.RenderContext

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.