Package org.xhtmlrenderer.render
Class RenderingContext
java.lang.Object
org.xhtmlrenderer.render.RenderingContext
- All Implemented Interfaces:
CssContext
Supplies information about the context in which rendering will take place
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FontContext
private final int
private final OutputDevice
private PageBox
private int
private int
private final Layer
protected SharedContext
-
Constructor Summary
ConstructorsConstructorDescriptionRenderingContext
(SharedContext sharedContext, OutputDevice outputDevice, FontContext fontContext, @Nullable Layer rootLayer, int initialPageNo) needs a new instance every run -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
@Nullable Box
getBoxById
(String id) @Nullable FSCanvas
getCss()
int
float
getDPI()
@Nullable FSFont
getFont
(FontSpecification font) float
getFSFontMetrics
(FSFont font) int
float
getPage()
int
int
getUac()
float
getXHeight
(FontSpecification parentFont) boolean
boolean
isPaged()
Returns true if the currently set media type is paged.boolean
isPrint()
void
void
setPageCount
(int pageCount)
-
Field Details
-
outputDevice
-
fontContext
-
pageCount
private int pageCount -
pageNo
private int pageNo -
page
-
rootLayer
-
initialPageNo
private final int initialPageNo
-
Constructor Details
-
Method Details
-
getUac
-
getBaseURL
-
getDPI
public float getDPI() -
getMmPerDot
public float getMmPerDot()- Specified by:
getMmPerDot
in interfaceCssContext
-
getDotsPerPixel
public int getDotsPerPixel()- Specified by:
getDotsPerPixel
in interfaceCssContext
-
getFontSize2D
- Specified by:
getFontSize2D
in interfaceCssContext
-
getXHeight
- Specified by:
getXHeight
in interfaceCssContext
-
getTextRenderer
-
isPaged
public boolean isPaged()Returns true if the currently set media type is paged. Currently, returns true only for print , projection , and embossed , handheld , and tv . See the media section of the CSS 2.1 spec for more information on media types.- Returns:
- The paged value
-
getFontResolver
-
getFont
- Specified by:
getFont
in interfaceCssContext
-
getCanvas
-
getFixedRectangle
-
getViewportRectangle
-
debugDrawBoxes
public boolean debugDrawBoxes() -
debugDrawLineBoxes
public boolean debugDrawLineBoxes() -
debugDrawInlineBoxes
public boolean debugDrawInlineBoxes() -
debugDrawFontMetrics
public boolean debugDrawFontMetrics() -
isInteractive
public boolean isInteractive() -
isPrint
public boolean isPrint() -
getOutputDevice
-
getFontContext
-
setPage
-
getPageCount
public int getPageCount() -
setPageCount
public void setPageCount(int pageCount) -
getPage
-
getPageNo
public int getPageNo() -
getCss
- Specified by:
getCss
in interfaceCssContext
-
getFSFontMetrics
- Specified by:
getFSFontMetrics
in interfaceCssContext
-
getRootLayer
-
getInitialPageNo
public int getInitialPageNo() -
getBoxById
-