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

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

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

WritableRenderedImage.getMinX介绍

暂无

代码示例

代码示例来源:origin: geosolutions-it/jai-ext

  1. /**
  2. * Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given
  3. * WritableRenderedImage source. If the bounds parameter is null, the entire image will be used.
  4. *
  5. * @param im a WritableRenderedImage source.
  6. * @param bounds the bounding Rectangle for the iterator, or null.
  7. * @return a WritableRandomIter allowing read/write access to the source.
  8. */
  9. public static WritableRandomIter createWritable(WritableRenderedImage im, Rectangle bounds) {
  10. if (bounds == null) {
  11. bounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight());
  12. }
  13. return new WritableRandomIterFallback(im, bounds);
  14. }

代码示例来源:origin: it.geosolutions.jaiext.iterators/jt-iterators

  1. /**
  2. * Constructs and returns an instance of WritableRandomIter suitable for iterating over the given bounding rectangle within the given
  3. * WritableRenderedImage source. If the bounds parameter is null, the entire image will be used.
  4. *
  5. * @param im a WritableRenderedImage source.
  6. * @param bounds the bounding Rectangle for the iterator, or null.
  7. * @return a WritableRandomIter allowing read/write access to the source.
  8. */
  9. public static WritableRandomIter createWritable(WritableRenderedImage im, Rectangle bounds) {
  10. if (bounds == null) {
  11. bounds = new Rectangle(im.getMinX(), im.getMinY(), im.getWidth(), im.getHeight());
  12. }
  13. return new WritableRandomIterFallback(im, bounds);
  14. }

代码示例来源:origin: geosolutions-it/jai-ext

  1. public void createRipplesImage(WritableRenderedImage destImg) {
  2. // image dimensions
  3. final int width = destImg.getWidth();
  4. final int height = destImg.getHeight();
  5. // first pixel coordinates
  6. int x = destImg.getMinX();
  7. int y = destImg.getMinY();
  8. // center pixel coordinates
  9. final int xc = x + destImg.getWidth() / 2;
  10. final int yc = y + destImg.getHeight() / 2;
  11. // constant term
  12. double C = Math.PI * 8;
  13. WritableRectIter iter = RectIterFactory.createWritable(destImg, null);
  14. do {
  15. double dy = ((double) (y - yc)) / yc;
  16. do {
  17. double dx = ((double) (x - xc)) / xc;
  18. double d = Math.sqrt(dx * dx + dy * dy);
  19. iter.setSample(Math.sin(d * C));
  20. x++ ;
  21. } while (!iter.nextPixelDone());
  22. x = destImg.getMinX();
  23. y++;
  24. iter.startPixels();
  25. } while (!iter.nextLineDone());
  26. }
  27. // docs-end-method

代码示例来源:origin: geosolutions-it/jai-ext

  1. public void runScriptWithBuilder(String script, String destVar, WritableRenderedImage destImage)
  2. throws JiffleException {
  3. // Image bounds are taken from the destination image
  4. Rectangle imageBounds = new Rectangle(
  5. destImage.getMinX(), destImage.getMinY(),
  6. destImage.getWidth(), destImage.getHeight());
  7. // The world bounds are the unit rectangle
  8. Rectangle2D worldBounds = new Rectangle2D.Double(0, 0, 1, 1);
  9. CoordinateTransform transform = CoordinateTransforms.unitBounds(imageBounds);
  10. JiffleBuilder builder = new JiffleBuilder();
  11. // Set the processing area (world units)
  12. builder.worldAndNumPixels(worldBounds, destImage.getWidth(), destImage.getHeight());
  13. // Set the script and the destination image with its transform
  14. builder.script(script).dest(destVar, destImage, transform);
  15. // This executes the script and writes the results into destImage
  16. builder.run();
  17. }
  18. // docs end builder method

代码示例来源:origin: geosolutions-it/jai-ext

  1. destImage.getMinX(), destImage.getMinY(),
  2. destImage.getWidth(), destImage.getHeight());

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

  1. if (!input.getSampleModel().equals(output.getSampleModel())) {
  2. throw new IllegalArgumentException(Resources.format(Resources.Keys.MismatchedSampleModel));
  3. } else if (input.getMinX() != output.getMinX() ||
  4. input.getMinY() != output.getMinY() ||
  5. input.getWidth() != output.getWidth() ||

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

  1. if (writableRI.getMinX() != areaIterateMinX //areaiteration
  2. if (renderedImage.getMinX() != writableRI.getMinX()
  3. || renderedImage.getMinY() != writableRI.getMinY()
  4. || renderedImage.getWidth() != writableRI.getWidth()

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

  1. if (renderedImage.getMinX() != writableRI.getMinX()
  2. || renderedImage.getMinY() != writableRI.getMinY()
  3. || renderedImage.getWidth() != writableRI.getWidth()

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

  1. final int xmin = image.getMinX();
  2. final int ymin = image.getMinY();
  3. final int width = image.getWidth();

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

  1. final int destMinRastXIndex = imageDest.getMinTileX() + (rectBound.x - imageDest.getMinX()) / tileWidth;
  2. final int destMinRastYIndex = imageDest.getMinTileY() + (rectBound.y - imageDest.getMinY()) / tileHeight;
  3. final int destMaxRastX = imageDest.getMinTileX() + (rectBound.x + rectBound.width + tileWidth - 1) / tileWidth;
  4. final double destX = (px + imageDest.getMinX()) / ((double) stepX); //-- remonter cette addition pour eviter n *

相关文章