Class PLRenderHelper

java.lang.Object
com.helger.pdflayout.render.PLRenderHelper

@Immutable public final class PLRenderHelper extends Object
  • Method Details

    • renderBorder

      public static void renderBorder(@Nonnull IPLObject<?> aElement, @Nonnull PDPageContentStreamWithCache aContentStream, float fLeft, float fTop, float fWidth, float fHeight, @Nonnull BorderSpec aBorder) throws IOException
      Render a single border
      Parameters:
      aElement - The element currently rendered. May not be null.
      aContentStream - Content stream
      fLeft - Left position (including left border width)
      fTop - Top position (including top border width)
      fWidth - Width (excluding left and right border width)
      fHeight - Height (excluding top and bottom border width)
      aBorder - Border to use. May not be null.
      Throws:
      IOException - In case of a PDFBox error
    • fillAndRenderBorder

      public static <T extends IPLElement<T>> void fillAndRenderBorder(@Nonnull T aElement, @Nonnull PageRenderContext aCtx, float fIndentX, float fIndentY) throws IOException
      Create the background fill (debug and real) and draw the border (debug and real) of an element.
      Type Parameters:
      T - element type to render
      Parameters:
      aElement - The element to be rendered. May not be null.
      aCtx - The render context incl. the content stream.
      fIndentX - Additional x-indentation
      fIndentY - Additional y-indentation
      Throws:
      IOException - in case writing fails
    • fillAndRenderBorder

      public static <T extends IPLObject<T> & IPLHasFillColor<T> & IPLHasMarginBorderPadding<T>> void fillAndRenderBorder(@Nonnull T aElement, float fLeft, float fTop, float fWidth, float fHeight, @Nonnull PDPageContentStreamWithCache aContentStream) throws IOException
      Create the background fill (debug and real) and draw the border (debug and real) of an element.
      Type Parameters:
      T - Type that implements IPLHasFillColor and IPLHasMarginBorderPadding
      Parameters:
      aElement - The element to be rendered. May not be null.
      fLeft - left
      fTop - top
      fWidth - width
      fHeight - height
      aContentStream - Content stream to act on. May not be null.
      Throws:
      IOException - in case writing fails