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

x33g5p2x  于2022-02-03 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(108)

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

WritableRenderedImage.getMinTileX介绍

暂无

代码示例

代码示例来源: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: 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: 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: apache/sis

} else if (input.getMinTileX()   != output.getMinTileX()  ||
      input.getMinTileY()   != output.getMinTileY()  ||
      input.getTileWidth()  != output.getTileWidth() ||

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

throw new IllegalArgumentException("rendered image and writable rendered image dimensions are not conform.\n" +
     "First : "+renderedImage+"\nSecond : "+writableRI);
final int wrimtx = writableRI.getMinTileX();
final int wrimty = writableRI.getMinTileY();
final int rimtx  = writableRI.getMinTileX();
final int rimty  = writableRI.getMinTileY();

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

final int rimty  = renderedImage.getMinTileY();
final int wrimtx = writableRI.getMinTileX();
final int wrimty = writableRI.getMinTileY();

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

if (fillValue.length != numBands)
    throw new IllegalArgumentException("fillValue table length and numbands are different : "+fillValue.length+" numbands = "+this.numBands);
assert(numBands == imageDest.getWritableTile(imageDest.getMinTileX(), imageDest.getMinTileY()).getNumBands())
    : "destination image numbands different from source image numbands";
this.destIterator              = PixelIteratorFactory.createDefaultWriteableIterator(this.imageDest, this.imageDest, resampleArea);

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

if (fillValue.length != numBands)
    throw new IllegalArgumentException("fillValue table length and numbands are different : "+fillValue.length+" numbands = "+this.numBands);
assert(numBands == imageDest.getWritableTile(imageDest.getMinTileX(), imageDest.getMinTileY()).getNumBands())
    : "destination image numbands different from source image numbands";
this.destIterator              = PixelIteratorFactory.createDefaultWriteableIterator(this.imageDest, this.imageDest, resampleArea);

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

final int destMinRastXIndex = imageDest.getMinTileX() + (rectBound.x - imageDest.getMinX()) / tileWidth;
final int destMinRastYIndex = imageDest.getMinTileY() + (rectBound.y - imageDest.getMinY()) / tileHeight;
final int destMaxRastX      = imageDest.getMinTileX() + (rectBound.x + rectBound.width + tileWidth - 1) / tileWidth;
final int destMaxRastY      = imageDest.getMinTileY() + (rectBound.y + rectBound.height + tileHeight - 1) / tileHeight;

相关文章