Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.PlanarImage


     * @param id An ID for the source which must be unique across all clients.
     * @param source a RenderedImage source.
     */
    public void setSource(Long id, RenderedImage source)
        throws RemoteException {
            PlanarImage pi = PlanarImage.wrapRenderedImage(source);
            addSource(id, pi, pi);
    }
View Full Code Here


                          RenderContextProxy renderContextProxy)
        throws RemoteException {
            RenderContext renderContext =
                renderContextProxy.getRenderContext();
            RenderedImage r = source.createRendering(renderContext);
            PlanarImage pi = PlanarImage.wrapRenderedImage(r);
            addSource(id, pi, pi);
    }
View Full Code Here

    public synchronized void setRenderedSource(Long id,
                 RenderedImage source,
                 int index)
  throws RemoteException {

  PlanarImage pi = PlanarImage.wrapRenderedImage(source);

  Object obj = nodes.get(id);

  if (obj instanceof RenderedOp) {
      RenderedOp op = (RenderedOp)obj;
View Full Code Here

     */
    public synchronized Long getRendering(Long id, SerializableState rcs)
  throws RemoteException {

  RenderableOp op = (RenderableOp)nodes.get(id);
  PlanarImage pi = PlanarImage.wrapRenderedImage(op.createRendering(
               (RenderContext)rcs.getObject()));

  Long renderingID = getRemoteID();
  nodes.put(renderingID, pi);

View Full Code Here

    public synchronized void setRenderableSource(Long id,
             RenderedImage source,
             int index)
  throws RemoteException {

  PlanarImage pi = PlanarImage.wrapRenderedImage(source);
  RenderableOp op = (RenderableOp)nodes.get(id);
  op.setSource(pi, index);
    }
View Full Code Here

    public synchronized Long handleEvent(Long renderedOpID, String propName,
           Object oldValue, Object newValue)
  throws RemoteException {

  RenderedOp op = (RenderedOp)nodes.get(renderedOpID);
  PlanarImage rendering = op.getRendering();

  // Get a new unique ID
  Long id = getRemoteID();
  // Cache the old rendering against the new id
  nodes.put(id, rendering);
View Full Code Here

    protected void accumulateStatistics(String name,
                                        Raster source,
                                        Object stats) {
        // Get image and band count.
        PlanarImage sourceImage = getSourceImage(0);
        int numBands = sourceImage.getSampleModel().getNumBands();

        // Determine the format tag and create an accessor.
        int formatTag = MediaLibAccessor.findCompatibleTag(null, source);
        MediaLibAccessor srcAccessor = new MediaLibAccessor(source,
                                                            source.getBounds(),
View Full Code Here

            // Retrieve the Interpolation object.
            Interpolation interp = (Interpolation)pb.getObjectParameter(1);

            // Determine the effective source bounds.
            Rectangle srcBounds = null;
            PlanarImage dst = op.getRendering();
            if (dst instanceof GeometricOpImage &&
                ((GeometricOpImage)dst).getBorderExtender() == null) {
                srcBounds =
                    new Rectangle(src.getMinX() + interp.getLeftPadding(),
                                  src.getMinY() + interp.getTopPadding(),
View Full Code Here

      RenderingChangeEvent rce = (RenderingChangeEvent)event;

      // Get index of source which changed.
      int idx = ((RenderedOp)node).getSources().indexOf(rce.getSource());

      PlanarImage oldSrcRendering = (PlanarImage)event.getOldValue();

      Object oldSrc = null;
      String serverNodeDesc = null;
      if (oldSrcRendering instanceof RMIServerProxy) {
View Full Code Here

            // Retrieve the Interpolation object.
            Interpolation interp = (Interpolation)pb.getObjectParameter(3);

            // Determine the effective source bounds.
            Rectangle srcBounds = null;
            PlanarImage dst = op.getRendering();
            if (dst instanceof GeometricOpImage &&
                ((GeometricOpImage)dst).getBorderExtender() == null) {
                srcBounds =
                    new Rectangle(src.getMinX() + interp.getLeftPadding(),
                                  src.getMinY() + interp.getTopPadding(),
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.PlanarImage

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.