/** * Sets the rendered image. * * @param image The image to set. */ void setRenderedImageAsTexture(TextureData image) { if (renderedImageAsTexture != null) renderedImageAsTexture.flush(); renderedImageAsTexture = image; if (renderedImageAsTexture != null) { if (init) { int imageWidth = image.getWidth(); if (imageWidth < ImViewer.MINIMUM_SIZE) { ratio = 1; gridRatio = 1; setUnitBar(false); } if (imageWidth * ratio > ImViewer.MAXIMUM_SIZE) ratio = (double) ImViewer.MAXIMUM_SIZE / imageWidth; init = false; } } // displayedImage = null; // combinedImage = null; clearTextureMap(gridImagesAsTextures); }
/** * Sets the rendered image. * * @param image The image to set. */ void setRenderedImage(BufferedImage image) { renderedImage = null; displayedImage = null; combinedImage = null; clearList(gridImages); renderedImage = image; if (renderedImage != null) { if (init) { int imageWidth = image.getWidth(); if (imageWidth < ImViewer.MINIMUM_SIZE) { ratio = 1; gridRatio = 1; setUnitBar(false); } if (imageWidth * ratio > ImViewer.MAXIMUM_SIZE) ratio = (double) ImViewer.MAXIMUM_SIZE / imageWidth; init = false; } } }