Class PLRenderHelper


  • @Immutable
    public final class PLRenderHelper
    extends Object
    • Method Detail

      • 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