@NotThreadSafe public final class RenderingContext extends Object
| Constructor and Description |
|---|
RenderingContext(ERenderingElementType eElementType,
PDPageContentStreamWithCache aCS,
boolean bDebugMode,
float fStartLeft,
float fStartTop,
float fWidth,
float fHeight) |
RenderingContext(RenderingContext aCtx,
float fStartLeft,
float fStartTop,
float fWidth,
float fHeight) |
| Modifier and Type | Method and Description |
|---|---|
com.helger.commons.collection.ext.ICommonsOrderedMap<String,String> |
getAllPlaceholders() |
PDPageContentStreamWithCache |
getContentStream() |
org.apache.pdfbox.pdmodel.PDDocument |
getDocument() |
ERenderingElementType |
getElementType() |
float |
getHeight() |
String |
getPlaceholder(String sName)
Get the placeholder value with the specified name.
|
int |
getPlaceholderAsInt(String sName,
int nDefault) |
float |
getStartLeft() |
float |
getStartTop() |
float |
getWidth() |
boolean |
isDebugMode() |
RenderingContext |
setPlaceholder(String sName,
int nValue) |
RenderingContext |
setPlaceholder(String sName,
String sValue) |
public RenderingContext(@Nonnull RenderingContext aCtx, float fStartLeft, float fStartTop, float fWidth, float fHeight)
aCtx - Context to copy settings from. May not be null.fStartLeft - Absolute page x-start position with element x-margin but without
element x-paddingfStartTop - Absolute page y-start position with element y-margin but without
element y-paddingfWidth - width without margin but including x-padding of the surrounding
elementfHeight - height without margin but including y-padding of the surrounding
elementpublic RenderingContext(@Nonnull ERenderingElementType eElementType, @Nonnull PDPageContentStreamWithCache aCS, boolean bDebugMode, float fStartLeft, float fStartTop, float fWidth, float fHeight)
eElementType - Element type. May not be null.aCS - Page content stream. May not be null.bDebugMode - debug mode?fStartLeft - Absolute page x-start position with element x-margin and x-border
but without element x-paddingfStartTop - Absolute page y-start position with element y-margin and y-border
but without element y-paddingfWidth - width without margin and border but including padding of the
surrounding elementfHeight - width without margin and border but including padding of the
surrounding element@Nonnull public ERenderingElementType getElementType()
null
.@Nonnull public PDPageContentStreamWithCache getContentStream()
null.@Nonnull public org.apache.pdfbox.pdmodel.PDDocument getDocument()
null.public boolean isDebugMode()
true if debug output should be emitted into the PDF,
false otherwise.@Nullable public String getPlaceholder(String sName)
sName - The name to search. May be null.null if no such placeholder exists.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsOrderedMap<String,String> getAllPlaceholders()
@Nonnull public RenderingContext setPlaceholder(@Nonnull @Nonempty String sName, int nValue)
@Nonnull public RenderingContext setPlaceholder(@Nonnull @Nonempty String sName, @Nonnull String sValue)
public float getStartLeft()
public float getStartTop()
public float getWidth()
public float getHeight()
Copyright © 2014–2016 Philip Helger. All rights reserved.