Package java.awt.image

Examples of java.awt.image.RescaleOp


     *            The graphics to draw on
     */
    private void draw(final Graphics2D graphics)
    {
      final float[] offsets = new float[4];
      final RescaleOp rop = new RescaleOp(scales, offsets, null);
      if (isHighlighted)
      {
        graphics.drawImage(getAnimal().highlightedImage, rop, location.x, location.y);
      }
      else
View Full Code Here


                filterColor = true;
            }
        }

        if (filterColor) {
            colorFilter = new RescaleOp(scaleColor, offsetColor, null);
        } else {
            colorFilter = null;
        }

        String grayscalePar = par.getParameter("grayscale", GRAYSCALE_DEFAULT);
View Full Code Here

     *            The graphics to draw on
     */
    private void draw(final Graphics2D graphics)
    {
      final float[] offsets = new float[4];
      final RescaleOp rop = new RescaleOp(scales, offsets, null);
      if (isHighlighted)
      {
        graphics.drawImage(getAnimal().highlightedImage, rop, location.x, location.y);
      }
      else
View Full Code Here

     * @param e Evento
     */
    public void sBrillo_stateChanged(ChangeEvent e) {
        //Comprobamos que se ha cargado una imagen
        if (this.imagenAbierta) {
            RescaleOp rop = new RescaleOp(1.0f,
                    (float) this.sBrillo.getValue(), null);
            BufferedImage aux = new BufferedImage(this.imagenSinModificar.getWidth(),
                    this.imagenSinModificar.getHeight(),
                    this.imagenSinModificar.getType());

            //Aplicamos el filtro de brillo a la imagen transformada por los filtros
            rop.filter(this.imagenTransformada, aux);

            //Establecemos la nueva imagen a mostrar
            this.PanelTapiz.setImagen(aux);

            //Ponemos que se ha modificado la imagen
View Full Code Here

            }
        }

        // increase contrast
        try {
            RescaleOp rescaleOp = new RescaleOp(1.8f, -30, null);
            rescaleOp.filter(newImage, newImage)// Source and destination are the same.
        } catch (Exception e) {
            throw new OcrException("Error rescaling OCR image", e);
        }

        return newImage;
View Full Code Here

        Point pos = getPosition(position, cellSize, pieceSize, margin);
        float transp = stone.getTransparency();
        Image img = getImage(stone);
        if (transp > 0) {
            scaleFactors_[3] = (255 - transp)/255;
            RescaleOp transparencyOp = new RescaleOp(scaleFactors_, OFFSETS, null);
            BufferedImage bufImg = ImageUtil.makeBufferedImage(getImage(stone));
            img = transparencyOp.filter(bufImg, null);
        }
        g2.drawImage(img, pos.x, pos.y, pieceSize, pieceSize , null);

        if (GameContext.getDebugMode() > 0 && inAtari) {
            g2.setColor(ATARI_COLOR);
View Full Code Here

     *            The graphics to draw on
     */
    private void draw(final Graphics2D graphics)
    {
      final float[] offsets = new float[4];
      final RescaleOp rop = new RescaleOp(scales, offsets, null);
      if (isHighlighted)
      {
        graphics.drawImage(getAnimal().highlightedImage, rop, location.x, location.y);
      }
      else
View Full Code Here

     *            The graphics to draw on
     */
    private void draw(final Graphics2D graphics)
    {
      final float[] offsets = new float[4];
      final RescaleOp rop = new RescaleOp(scales, offsets, null);
      if (isHighlighted)
      {
        graphics.drawImage(getAnimal().highlightedImage, rop, location.x, location.y);
      }
      else
View Full Code Here

TOP

Related Classes of java.awt.image.RescaleOp

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.