Package net.sf.jasperreports.engine

Examples of net.sf.jasperreports.engine.JRPrintImage


 
          for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
          {
            JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();
 
            JRPrintImage image = getImage(jasperPrintList, imageIndex);
            JRRenderable renderer = image.getRenderer();
            if (renderer.getType() == JRRenderable.TYPE_SVG)
            {
              renderer =
                new JRWrappingSvgRenderer(
                  renderer,
                  new Dimension(image.getWidth(), image.getHeight()),
                  ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
                  );
            }
 
            byte[] imageData = renderer.getImageData();
 
View Full Code Here


    {
      for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
      {
        JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();

        JRPrintImage image = getImage(jasperPrintList, imageIndex);
        JRRenderable renderer = image.getRenderer();
        if (renderer.getType() == JRRenderable.TYPE_SVG)
        {
          renderer =
            new JRWrappingSvgRenderer(
              renderer,
              new Dimension(image.getWidth(), image.getHeight()),
              ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
              );
        }

        String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());
        if (mimeType == null)
View Full Code Here

      {
        for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
        {
          JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();

          JRPrintImage image = getImage(jasperPrintList, imageIndex);
          JRRenderable renderer = image.getRenderer();
          if (renderer.getType() == JRRenderable.TYPE_SVG)
          {
            renderer =
              new JRWrappingSvgRenderer(
                renderer,
                new Dimension(image.getWidth(), image.getHeight()),
                ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
                );
          }

          String mimeType = JRTypeSniffer.getImageMimeType(renderer.getImageType());
          if (mimeType == null)
View Full Code Here

    HorizontalAlignEnum horizontalAlignment = HorizontalAlignEnum.LEFT;
    VerticalAlignEnum verticalAlignment = VerticalAlignEnum.TOP;

    if(element instanceof JRPrintImage)
    {
      JRPrintImage imageElement = (JRPrintImage)element;
      horizontalAlignment = imageElement.getHorizontalAlignmentValue();
      verticalAlignment = imageElement.getVerticalAlignmentValue();
    }

    switch(horizontalAlignment)
    {
      case RIGHT:
View Full Code Here

          newRenderer = (JRRenderable) source;
        }

        if (isUsingCache())
        {
          JRPrintImage img = new JRTemplatePrintImage(getJRTemplateImage());
          img.setRenderer(newRenderer);
          filler.fillContext.registerLoadedImage(source, img);
        }
      }
    }
View Full Code Here

 
  protected void resolveElement(JRPrintElement element, byte evaluation) throws JRException
  {
    evaluateImage(evaluation);

    JRPrintImage printImage = (JRPrintImage) element;

    if (getScaleImageValue() == ScaleImageEnum.REAL_SIZE)//to avoid get dimension and thus unnecessarily load the image
    {
      int padding = printImage.getLineBox().getBottomPadding().intValue()
      + printImage.getLineBox().getTopPadding().intValue();
      fitImage(getHeight() - padding, false,
          printImage.getHorizontalAlignmentValue());
    }
   
    copy(printImage);
  }
View Full Code Here

    {
      for(Iterator it = imagesToProcess.iterator(); it.hasNext();)
      {
        JRPrintElementIndex imageIndex = (JRPrintElementIndex)it.next();

        JRPrintImage image = getImage(jasperPrintList, imageIndex);
        JRRenderable renderer = image.getRenderer();
        if (renderer.getType() == JRRenderable.TYPE_SVG)
        {
          renderer =
            new JRWrappingSvgRenderer(
              renderer,
              new Dimension(image.getWidth(), image.getHeight()),
              ModeEnum.OPAQUE == image.getModeValue() ? image.getBackcolor() : null
              );
        }

        oasisZip.addEntry(//FIXMEODT optimize with a different implementation of entry
          new FileBufferedZipEntry(
View Full Code Here

  /**
   *
   */
  public Object createObject(Attributes atts)
  {
    JRPrintImage printImage = (JRPrintImage)digester.peek();

    JRPrintImageSourceObject imageSource = new JRPrintImageSourceObject();

    imageSource.setPrintImage(printImage);

View Full Code Here

    line.setY(50);
    line.setWidth(515);
    line.setHeight(0);
    page.addElement(line);
   
    JRPrintImage image = new JRBasePrintImage(jasperPrint.getDefaultStyleProvider());
    image.setX(45);
    image.setY(55);
    image.setWidth(165);
    image.setHeight(40);
    image.setScaleImage(ScaleImageEnum.CLIP);
    image.setRenderer(
      JRImageRenderer.getInstance(
        JRLoader.loadBytesFromLocation("jasperreports.png")
        )
      );
    page.addElement(image);
View Full Code Here

    line.setY(50);
    line.setWidth(515);
    line.setHeight(0);
    page.addElement(line);
   
    JRPrintImage image = new JRBasePrintImage(jasperPrint.getDefaultStyleProvider());
    image.setX(45);
    image.setY(55);
    image.setWidth(165);
    image.setHeight(40);
    image.setScaleImage(ScaleImageEnum.CLIP);
    image.setRenderer(
      JRImageRenderer.getInstance(
        JRLoader.loadBytesFromLocation("jasperreports.png")
        )
      );
    page.addElement(image);
View Full Code Here

TOP

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

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.