@JsonData
public class ResultPage
extends java.lang.Object
implements java.io.Serializable
ResultPage
.Modifier | Constructor and Description |
---|---|
protected |
ResultPage(com.inet.pdfc.generator.message.PageData data,
com.inet.pdfc.generator.rendercache.PageImageCache renderSource,
ResultModel model)
Creates a page for the
ResultModel |
protected |
ResultPage()
Create uninitialized page
|
Modifier and Type | Method and Description |
---|---|
int |
getHeight()
Returns the unscaled height of the page in pixel
|
java.util.List<HighlightData.Highlight> |
getHighlights()
Returns a list with all highlights for this page
|
java.awt.image.BufferedImage |
getPageImage(double scale)
Renders the page to a
BufferedImage . |
java.awt.image.BufferedImage |
getPageImage(double scaleX,
double scaleY)
Renders the page to a
BufferedImage . |
int |
getPageIndex()
Returns the zero based page index of this page
|
int |
getPageOffset()
Returns the page offset which is the absolute rendering position in side by side mode.
|
java.awt.Dimension |
getSize()
Returns the size of the page in pixels, unscaled
|
protected java.util.List<TextInfo> |
getTextInfos()
Returns the text infos required to select and copy text
|
int |
getWidth()
Returns the unscaled width of the page in pixel
|
boolean |
hasPageImage()
Returns whether the page image cache contains an image for this page
|
boolean |
isLeft()
Check whether this page is on the left side or on the right side.
|
void |
renderPage(double scale,
java.awt.Graphics2D g2)
Renders the page to a
BufferedImage . |
protected void |
setData(com.inet.pdfc.generator.message.PageData data)
Copies the page data into the
ResultPage |
void |
setModel(ResultModel model)
Sets the model as well as the renderSource of this page
|
protected void |
setPageOffset(int yOffset)
Updates the page offset.
|
protected ResultPage(com.inet.pdfc.generator.message.PageData data, com.inet.pdfc.generator.rendercache.PageImageCache renderSource, ResultModel model)
ResultModel
data
- the page data as passed by the comparer, must not be null
renderSource
- the render source to query for page images, must not be null
model
- the actual comparison model this page belongs toprotected ResultPage()
protected void setData(com.inet.pdfc.generator.message.PageData data)
ResultPage
data
- the data to be copied, must not be null
public int getWidth()
public int getHeight()
public int getPageOffset()
protected void setPageOffset(int yOffset)
yOffset
- the page offset of the page in pixelsgetPageOffset()
public int getPageIndex()
public java.util.List<HighlightData.Highlight> getHighlights()
null
if there are no highlights@Nullable public java.awt.image.BufferedImage getPageImage(double scale)
BufferedImage
.scale
- the scale factor@Nullable public java.awt.image.BufferedImage getPageImage(double scaleX, double scaleY)
BufferedImage
. This mehtod allowes a change in the aspect ratio of the returned
imagescaleX
- the scale factor along the X axisscaleY
- the scale factor along the Y axispublic void renderPage(double scale, java.awt.Graphics2D g2)
BufferedImage
.scale
- the scale factorg2
- the graphics instance which will be used for renderingpublic java.awt.Dimension getSize()
public boolean hasPageImage()
protected java.util.List<TextInfo> getTextInfos()
public boolean isLeft()
public void setModel(ResultModel model)
model
- the model to setCopyright © 2010-2022 by i-net software GmbH