Package com.helger.pdflayout.render
Class PLRenderHelper
- java.lang.Object
-
- com.helger.pdflayout.render.PLRenderHelper
-
@Immutable public final class PLRenderHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends IPLObject<T> & IPLHasFillColor<T> & IPLHasMarginBorderPadding<T>>
voidfillAndRenderBorder(T aElement, float fLeft, float fTop, float fWidth, float fHeight, PDPageContentStreamWithCache aContentStream)Create the background fill (debug and real) and draw the border (debug and real) of an element.static <T extends IPLElement<T>>
voidfillAndRenderBorder(T aElement, PageRenderContext aCtx, float fIndentX, float fIndentY)Create the background fill (debug and real) and draw the border (debug and real) of an element.static voidrenderBorder(IPLObject<?> aElement, PDPageContentStreamWithCache aContentStream, float fLeft, float fTop, float fWidth, float fHeight, BorderSpec aBorder)Render a single border
-
-
-
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 benull.aContentStream- Content streamfLeft- 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 benull.- 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 benull.aCtx- The render context incl. the content stream.fIndentX- Additional x-indentationfIndentY- 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 implementsIPLHasFillColorandIPLHasMarginBorderPadding- Parameters:
aElement- The element to be rendered. May not benull.fLeft- leftfTop- topfWidth- widthfHeight- heightaContentStream- Content stream to act on. May not benull.- Throws:
IOException- in case writing fails
-
-