Examples of crop()


Examples of org.eclipse.draw2d.geometry.Rectangle.crop()

  g.drawLine(r.x, r.y + 2, r.x, r.bottom() - 3);
  g.drawLine(r.right() - 1, r.bottom() - 3, r.right() - 1, r.y + 2);
 
  r.crop(new Insets(1, 1, 0, 0));
  r.expand(1, 1);
  r.crop(getInsets(figure));
  drawConnectors(g, figure.getBounds().getCropped(in));
}

}
View Full Code Here

Examples of org.eclipse.draw2d.geometry.Rectangle.crop()

/**
* @see org.eclipse.draw2d.Figure#paintFigure(Graphics)
*/
protected void paintFigure(Graphics graphics) {
  Rectangle rect = getBounds().getCopy();
  rect.crop(new Insets(2,0,2,0));
  graphics.fillRectangle(rect);
}

public void setInputConnectionAnchor(int i, ConnectionAnchor c) {
  connectionAnchors.put(Circuit.TERMINALS_IN[i],c);
View Full Code Here

Examples of org.eclipse.wb.draw2d.geometry.Rectangle.crop()

        bounds.resize(0, -barThickness);
      } else if (barPosition.equalsIgnoreCase("RIGHT")) {
        bounds.resize(-barThickness, 0);
      }
      // crop insets
      bounds.crop(tabSet.getTabInsets());
      // translate to TabSet
      bounds.translate(tabSet.getModelBounds().getLocation().getNegated());
      // ready
      setModelBounds(bounds);
      // process children
View Full Code Here

Examples of org.geotools.image.ImageWorker.crop()

                                    return null;
                                }
                                // crop
                                ImageWorker iw = new ImageWorker(mosaic);
                                iw.setRenderingHints(localHints);
                                iw.crop(imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);
                                mosaic = iw.getRenderedImage();
                                imageBounds = PlanarImage.wrapRenderedImage(mosaic).getBounds();
                            }
   
                            // and, do we need to add a BORDER around the image?
View Full Code Here

Examples of org.geotools.image.ImageWorker.crop()

                            JAI.KEY_IMAGE_LAYOUT, layout));
        } else {
            // Check if we need to crop a subset of the produced image, else return it right away
            if (imageBounds.contains(mapRasterArea) && !imageBounds.equals(mapRasterArea)) { // the produced image does not need a final mosaicking operation but a crop!
                ImageWorker iw = new ImageWorker(image);
                iw.crop(0, 0, mapWidth, mapHeight);
                image = iw.getRenderedImage();
            }
        }
       
        return image;
View Full Code Here

Examples of org.im4java.core.IMOperation.crop()

            op.addImage(getFile(iw).getPath());

            if(square) {
                op.resize(size,size,"^");
                op.gravity("center");
                op.crop(size,size,0,0);
            } else {
                op.resize(size,size);
            }

            op.addImage(outputFile.getPath());
View Full Code Here

Examples of org.im4java.core.IMOperation.crop()

            ConvertCmd cmd = new ConvertCmd();

            // create the operation, add images and operators/options
            IMOperation op = new IMOperation();
            op.addImage(getFile(i).getPath());
            op.crop(width, height, left, top);
            op.addImage(outputFile.getPath());

            cmd.run(op);
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

Examples of org.im4java.core.IMOperation.crop()

        int croppedHeight = (int) (scaledHeight - Math.max(cropY, 0.0f));

        // Do the cropping
        IMOperation cropOperation = new IMOperation();
        cropOperation.addImage(scaledFile.getAbsolutePath());
        cropOperation.crop(croppedWidth, croppedHeight, croppedLeft, croppedTop);
        cropOperation.p_repage(); // Reset the page canvas and position to match
        // the actual cropped image
        cropOperation.addImage(croppedFile.getAbsolutePath());
        imageMagick.run(cropOperation);
        finalFile = croppedFile;
View Full Code Here

Examples of ptolemy.data.MatrixToken.crop()

        int rowSpanValue = ((IntToken) rowSpan.getToken()).intValue();

        // FIXME: We are not enforcing that the input is a matrix.
        // How to do this?
        MatrixToken inputValue = (MatrixToken) input.get(0);
        output.send(0, inputValue.crop(rowValue, columnValue, rowSpanValue,
                columnSpanValue));
    }
}
View Full Code Here

Examples of railo.runtime.img.Image.crop()

    if (width < 0)
        throw new FunctionException(pc,"ImageCrop",3,"width","width must contain a none negative value");
    if (height < 0)
        throw new FunctionException(pc,"ImageCrop",4,"height","width must contain a none negative value");
   
    img.crop((float)x, (float)y, (float)width, (float)height);
    return null;
  }
 
}
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.