gpt4 book ai didi

java.awt.image.WritableRenderedImage.releaseWritableTile()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-27 02:47:05 26 4
gpt4 key购买 nike

本文整理了Java中java.awt.image.WritableRenderedImage.releaseWritableTile()方法的一些代码示例,展示了WritableRenderedImage.releaseWritableTile()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WritableRenderedImage.releaseWritableTile()方法的具体详情如下:
包路径:java.awt.image.WritableRenderedImage
类名称:WritableRenderedImage
方法名:releaseWritableTile

WritableRenderedImage.releaseWritableTile介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

/**
 * Sets every samples in the given image to the given value. This method is typically used for
 * clearing an image content.
 *
 * @param image The image to fill.
 * @param value The value to to given to every samples.
 */
public static void fill(final WritableRenderedImage image, final Number value) {
  int y = image.getMinTileY();
  for (int ny = image.getNumYTiles(); --ny >= 0; ) {
    int x = image.getMinTileX();
    for (int nx = image.getNumXTiles(); --nx >= 0; ) {
      final WritableRaster raster = image.getWritableTile(x, y);
      try {
        fill(raster.getDataBuffer(), value);
      } finally {
        image.releaseWritableTile(x, y);
      }
    }
  }
}

代码示例来源:origin: apache/sis

/**
   * Releases the tiles acquired by this iterator, if any.
   * This method does nothing if the iterator is read-only.
   */
  @Override
  public void close() {
    if (destination != null && destRaster != null) {
      destRaster = null;
      destination.releaseWritableTile(tileX, tileY);
    }
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
   * {@inheritDoc }.
   */
  @Override
  public void close() {
     writableRenderedImage.releaseWritableTile(prectX, prectY);
    super.close();
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * {@inheritDoc }.
 */
@Override
public void close() {
  super.close();
  writableRenderedImage.releaseWritableTile(prectX, prectY);
}

代码示例来源:origin: Geomatys/geotoolkit

/**
   * {@inheritDoc }.
   */
  @Override
  public void close() {
     writableRenderedImage.releaseWritableTile(prectX, prectY);
    super.close();
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
   * {@inheritDoc }.
   */
  @Override
  public void close() {
     writableRenderedImage.releaseWritableTile(prectX, prectY);
    super.close();
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * {@inheritDoc }.
 */
@Override
public void close() {
  writableRenderedImage.releaseWritableTile(prectX, prectY);
  super.close();
}

代码示例来源:origin: Geomatys/geotoolkit

/**
   * {@inheritDoc }.
   */
  @Override
  public void close() {
     writableRenderedImage.releaseWritableTile(prectX, prectY);
    super.close();
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * {@inheritDoc }.
 */
@Override
protected void updateCurrentRaster(int tileX, int tileY) {
  super.updateCurrentRaster(tileX, tileY);
  if (currentWritableRaster != null) writableRenderedImage.releaseWritableTile(prectX, prectY);
  this.currentWritableRaster    = writableRenderedImage.getWritableTile(tileX, tileY);
  this.currentWritableDataArray = ((DataBufferByte) currentWritableRaster.getDataBuffer()).getData();
  this.prectX = tileX;
  this.prectY = tileY;
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Update current writable raster from tiles array coordinates.
 */
@Override
protected void updateCurrentRaster(int tileX, int tileY) {
  super.updateCurrentRaster(tileX, tileY);
  if (currentWritableDataArray != null) writableRenderedImage.releaseWritableTile(prectX, prectY);
  currentWritableDataArray = ((DataBufferByte) writableRenderedImage.getWritableTile(tileX, tileY).getDataBuffer()).getData();
  this.prectX = tileX;
  this.prectY = tileY;
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Update current writable raster from tiles array coordinates.
 */
@Override
protected void updateCurrentRaster(int tileX, int tileY) {
  super.updateCurrentRaster(tileX, tileY);
  if (currentWritableRaster != null) writableRenderedImage.releaseWritableTile(prectX, prectY);
  currentWritableRaster = writableRenderedImage.getWritableTile(tileX, tileY);
  this.prectX = tileX;
  this.prectY = tileY;
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * {@inheritDoc }.
 */
@Override
protected void updateCurrentRaster(int tileX, int tileY) {
  super.updateCurrentRaster(tileX, tileY);
  if (currentWritableRaster != null) writableRenderedImage.releaseWritableTile(prectX, prectY);
  this.currentWritableRaster = writableRenderedImage.getWritableTile(tileX, tileY);
  prectX = tileX;
  prectY = tileY;
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Update current writable raster from tiles array coordinates.
 */
@Override
protected void updateCurrentRaster(int tileX, int tileY) {
  super.updateCurrentRaster(tileX, tileY);
  if (currentWritableDataArray != null) writableRenderedImage.releaseWritableTile(prectX, prectY);
  currentWritableDataArray = ((DataBufferFloat) writableRenderedImage.getWritableTile(tileX, tileY).getDataBuffer()).getData();
  this.prectX = tileX;
  this.prectY = tileY;
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * {@inheritDoc }.
 */
@Override
protected void updateCurrentRaster(int tileX, int tileY) {
  super.updateCurrentRaster(tileX, tileY);
  if (currentWritableRaster != null) writableRenderedImage.releaseWritableTile(prectX, prectY);
  this.currentWritableRaster    = writableRenderedImage.getWritableTile(tileX, tileY);
  this.currentWritableRaster    = writableRenderedImage.getWritableTile(tileX, tileY);
  this.currentWritableDataArray = ((DataBufferFloat) currentWritableRaster.getDataBuffer()).getData();
  this.prectX = tileX;
  this.prectY = tileY;
}

代码示例来源:origin: eu.agrosense.client/grid-api

public void setRasterValue(Coordinate coordinate, int value) {
    checkState();

    if (!boundingBox.contains(coordinate.x, coordinate.y)) {
      throw new IllegalArgumentException("Can only add raster values for coordinates (" + coordinate + ") within the bounding box (" + boundingBox + ")");
    }

    Point p = this.gridCellSize.getCell(boundingBox, coordinate);
//        LOGGER.log(Level.FINEST, "raster value set to {0} on cell {1}", new Object[]{value, p});

    WritableRenderedImage raster = getRenderedImage();
    WritableRaster tile = raster.getWritableTile(p.x, p.y);
    try {
      tile.setSample(p.x, p.y, 0, value);
    } catch (ArrayIndexOutOfBoundsException e) {
      LOGGER.log(Level.WARNING, "ArrayIndexOutOfBoundsException for p.x={0} and p.y={1}", new Object[]{p.x, p.y});
    }
    raster.releaseWritableTile(p.x, p.y);

  }

代码示例来源:origin: org.geotools/gt-coverage

/**
 * Sets every samples in the given image to the given value. This method is typically used
 * for clearing an image content.
 *
 * @param image The image to fill.
 * @param value The value to to given to every samples.
 */
public static void fill(final WritableRenderedImage image, final Number value) {
  int y = image.getMinTileY();
  for (int ny = image.getNumYTiles(); --ny >= 0;) {
    int x = image.getMinTileX();
    for (int nx = image.getNumXTiles(); --nx >= 0;) {
      final WritableRaster raster = image.getWritableTile(x, y);
      try {
        fill(raster.getDataBuffer(), value);
      } finally {
        image.releaseWritableTile(x, y);
      }
    }
  }
}

代码示例来源:origin: Geomatys/geotoolkit

/**
 * Sets every samples in the given image to the given value. This method is typically used
 * for clearing an image content.
 *
 * @param image The image to fill.
 * @param value The value to be given to every samples.
 */
public static void fill(final WritableRenderedImage image, final Number value) {
  int y = image.getMinTileY();
  for (int ny = image.getNumYTiles(); --ny >= 0; y++) {
    int x = image.getMinTileX();
    for (int nx = image.getNumXTiles(); --nx >= 0; x++) {
      final WritableRaster raster = image.getWritableTile(x, y);
      try {
        fill(raster.getDataBuffer(), value);
      } finally {
        image.releaseWritableTile(x, y);
      }
    }
  }
}

代码示例来源:origin: Geomatys/geotoolkit

fill(raster, top, bottom, bounds, x, y, oldSamples, newSamples, stack);
} finally {
  image.releaseWritableTile(tileX, tileY);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com