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 FontContext
private int
private OutputDevice
private PageBox
private int
private int
private Layer
protected SharedContext
-
Constructor Summary
ConstructorsConstructorDescriptionRenderingContext
(SharedContext sharedContext) needs a new instance every run -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
getBoxById
(String id) getCss()
int
float
getDPI()
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
setBaseURL
(String url) void
setContext
(SharedContext sharedContext) void
setFontContext
(FontContext fontContext) void
setInitialPageNo
(int initialPageNo) void
setOutputDevice
(OutputDevice outputDevice) void
void
setPageCount
(int pageCount) void
setRootLayer
(Layer rootLayer)
-
Field Details
-
outputDevice
-
fontContext
-
pageCount
private int pageCount -
pageNo
private int pageNo -
page
-
rootLayer
-
initialPageNo
private int initialPageNo
-
Constructor Details
-
Method Details
-
setBaseURL
-
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
-
setOutputDevice
-
getFontContext
-
setFontContext
-
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
-
setRootLayer
-
getInitialPageNo
public int getInitialPageNo() -
setInitialPageNo
public void setInitialPageNo(int initialPageNo) -
getBoxById