Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRImageRenderer


                image = com.lowagie.text.Image.getInstance(renderer.getImageData());
                imageTesterPdfContentByte.addImage(image, 10, 0, 0, 10, 0, 0);
              }
              catch(Exception e)
              {
                JRImageRenderer tmpRenderer =
                  JRImageRenderer.getOnErrorRendererForImage(
                    JRImageRenderer.getInstance(renderer.getImageData()),
                    printImage.getOnErrorTypeValue()
                    );
                if (tmpRenderer == null)
                {
                  break;
                }
                java.awt.Image awtImage = tmpRenderer.getImage();
                image = com.lowagie.text.Image.getInstance(awtImage, null);
              }

              if (printImage.isUsingCache())
              {
                loadedImagesMap.put(renderer, image);
              }
            }

            image.scaleAbsolute(availableImageWidth, availableImageHeight);
            break;
          }
          case RETAIN_SHAPE :
          default :
          {
            if (printImage.isUsingCache() && loadedImagesMap.containsKey(renderer))
            {
              image = (com.lowagie.text.Image)loadedImagesMap.get(renderer);
            }
            else
            {
              try
              {
                image = com.lowagie.text.Image.getInstance(renderer.getImageData());
                imageTesterPdfContentByte.addImage(image, 10, 0, 0, 10, 0, 0);
              }
              catch(Exception e)
              {
                JRImageRenderer tmpRenderer =
                  JRImageRenderer.getOnErrorRendererForImage(
                    JRImageRenderer.getInstance(renderer.getImageData()),
                    printImage.getOnErrorTypeValue()
                    );
                if (tmpRenderer == null)
                {
                  break;
                }
                java.awt.Image awtImage = tmpRenderer.getImage();
                image = com.lowagie.text.Image.getInstance(awtImage, null);
              }

              if (printImage.isUsingCache())
              {
View Full Code Here

TOP

Related Classes of net.sf.jasperreports.engine.JRImageRenderer

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.