Package org.pentaho.reporting.engine.classic.core.util.geom

Examples of org.pentaho.reporting.engine.classic.core.util.geom.StrictBounds


                                 final long contentHeight,
                                 final StyleSheet styleSheet,
                                 final DrawableWrapper drawable) throws ContentIOException, IOException
  {
    // render it into an Buffered image and make it a PNG file.
    final StrictBounds cb = new StrictBounds(0, 0, width, height);
    final ImageContainer image =
        RenderUtility.createImageFromDrawable(drawable, cb, styleSheet, metaData);
    if (image == null)
    {
      //xmlWriter.writeComment("Drawable content [No image generated]:" + source);
View Full Code Here


    {
      try
      {
        final ImageContainer imageContainer = new DefaultImageReference((Image) value);
        final StyleSheet rawSource = textExtractor.getRawSource().getStyleSheet();
        final StrictBounds contentBounds =
            new StrictBounds(content.getX(), content.getY() + contentOffset, content.getWidth(), content.getHeight());
        createImageCell(rawSource, imageContainer, sheetLayout, rectangle, contentBounds);
      }
      catch (IOException ioe)
      {
        // Should not happen.
        ExcelPrinter.logger.warn("Failed to process AWT-Image in Excel-Export", ioe);
      }
      return true;
    }
    else if (value instanceof ImageContainer)
    {
      final ImageContainer imageContainer = (ImageContainer) value;
      // todo: this is wrong ..
      final StyleSheet rawSource = textExtractor.getRawSource().getStyleSheet();
      final StrictBounds contentBounds =
          new StrictBounds(content.getX(), content.getY() + contentOffset, content.getWidth(), content.getHeight());
      createImageCell(rawSource, imageContainer, sheetLayout, rectangle, contentBounds);
      return true;
    }
    else if (value instanceof DrawableWrapper)
    {
      final DrawableWrapper drawable = (DrawableWrapper) value;
      final RenderNode rawSource = textExtractor.getRawSource();
      final StrictBounds contentBounds = new StrictBounds
          (rawSource.getX(), rawSource.getY() + contentOffset, rawSource.getWidth(), rawSource.getHeight());
      final ImageContainer imageFromDrawable =
          RenderUtility.createImageFromDrawable(drawable, contentBounds, content, getMetaData());
      createImageCell(rawSource.getStyleSheet(), imageFromDrawable, sheetLayout, rectangle, contentBounds);
      return true;
View Full Code Here

        pointShortConverter.format(marginRight));

    xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "physical-page", pageAttributes, XmlWriter.OPEN);

    // and now process the box ..
    drawArea = new StrictBounds(page.getGlobalX(), page.getGlobalY(),
        page.getImageableWidth(), page.getImageableHeight());
    processPage(logicalPage);

    xmlWriter.writeCloseTag();
  }
View Full Code Here

    pageAttributes.setAttribute(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "height", pointConverter.format(height));

    xmlWriter.writeTag(XmlDocumentWriter.LAYOUT_OUTPUT_NAMESPACE, "logical-page", pageAttributes, XmlWriter.OPEN);

    // and now process the box ..
    drawArea = new StrictBounds(0, 0, logicalPage.getPageWidth(), logicalPage.getPageHeight());
    processPage(logicalPage);

    xmlWriter.writeCloseTag();
  }
View Full Code Here

    xmlWriter.writeCloseTag();
  }

  protected void processPage(final LogicalPageBox rootBox)
  {
    final StrictBounds pageBounds = drawArea;
    startProcessing(rootBox.getWatermarkArea());

    final BlockRenderBox headerArea = rootBox.getHeaderArea();
    final BlockRenderBox footerArea = rootBox.getFooterArea();
    final BlockRenderBox repeatFooterArea = rootBox.getRepeatFooterArea();
    final StrictBounds headerBounds =
        new StrictBounds(headerArea.getX(), headerArea.getY(), headerArea.getWidth(), headerArea.getHeight());
    final StrictBounds footerBounds =
        new StrictBounds(footerArea.getX(), footerArea.getY(), footerArea.getWidth(), footerArea.getHeight());
    final StrictBounds repeatFooterBounds = new StrictBounds
        (repeatFooterArea.getX(), repeatFooterArea.getY(), repeatFooterArea.getWidth(), repeatFooterArea.getHeight());
    final StrictBounds contentBounds = new StrictBounds
        (rootBox.getX(), headerArea.getY() + headerArea.getHeight(),
            rootBox.getWidth(), footerArea.getY() - headerArea.getHeight());
    this.drawArea = headerBounds;
    startProcessing(headerArea);
    this.drawArea = contentBounds;
View Full Code Here

    if (rawObject instanceof DrawableWrapper)
    {
      final DrawableWrapper drawable = (DrawableWrapper) rawObject;
      // render it into an Buffered image and make it a PNG file.
      final StrictBounds cb = new StrictBounds(0, 0, width, height);
      final DefaultImageReference image =
          RenderUtility.createImageFromDrawable(drawable, cb, styleSheet, metaData);
      if (image == null)
      {
        //xmlWriter.writeComment("Drawable content [No image generated]:" + source);
View Full Code Here

    }
    g2.translate(-area.getX(), -area.getY());

    try
    {
      final StrictBounds pageBounds =
          StrictGeomUtility.createBounds(area.getX(), area.getY(), area.getWidth(), area.getHeight());
      this.pageArea = pageBounds;
      this.drawArea = pageBounds;
      this.graphics = g2;
View Full Code Here

    startProcessing(rootBox.getWatermarkArea());

    final BlockRenderBox headerArea = rootBox.getHeaderArea();
    final BlockRenderBox footerArea = rootBox.getFooterArea();
    final BlockRenderBox repeatFooterArea = rootBox.getRepeatFooterArea();
    final StrictBounds headerBounds =
        new StrictBounds(headerArea.getX(), headerArea.getY(), headerArea.getWidth(), headerArea.getHeight());
    final StrictBounds footerBounds =
        new StrictBounds(footerArea.getX(), footerArea.getY(), footerArea.getWidth(), footerArea.getHeight());
    final StrictBounds repeatFooterBounds = new StrictBounds
        (repeatFooterArea.getX(), repeatFooterArea.getY(), repeatFooterArea.getWidth(), repeatFooterArea.getHeight());
    final StrictBounds contentBounds = new StrictBounds
        (rootBox.getX(), headerArea.getY() + headerArea.getHeight(),
            rootBox.getWidth(), repeatFooterArea.getY() - headerArea.getHeight());

    final double headerHeight = StrictGeomUtility.toExternalValue(drawArea.getHeight());
View Full Code Here

  protected boolean startTableSectionBox(final TableSectionRenderBox box)
  {
    if (box.getDisplayRole() != TableSectionRenderBox.Role.HEADER)
    {
      final StrictBounds bounds = tableContext.getBounds();
      if (bounds.getHeight() != 0)
      {
        // clip the printable area to an infinite large area below the header.
        // Pdf output has a limit of 32768 for its floating point numbers (16-bit),
        // any larger value yields an invalid clipping area.
        final StrictBounds clipBounds = new StrictBounds
            (bounds.getX(), bounds.getY() + bounds.getHeight(),
                StrictGeomUtility.toInternalValue(Short.MAX_VALUE),
                StrictGeomUtility.toInternalValue(Short.MAX_VALUE));
        clip(clipBounds);
        tableContext.getDrawArea().setRect(drawArea);
View Full Code Here

    private StrictBounds drawArea;

    private TableContext(final TableContext parent)
    {
      this.parent = parent;
      this.bounds = new StrictBounds();
      this.drawArea = new StrictBounds();
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.util.geom.StrictBounds

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.