Package org.ghost4j.display
Class PageRasterDisplayCallback
- java.lang.Object
-
- org.ghost4j.display.PageRasterDisplayCallback
-
- All Implemented Interfaces:
DisplayCallback
public class PageRasterDisplayCallback extends java.lang.Object implements DisplayCallback
Display callback in charge of extracting raw page rasters (PageRaster)
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<PageRaster>
rasters
-
Constructor Summary
Constructors Constructor Description PageRasterDisplayCallback()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
displayClose()
Method called when device has been closed.void
displayOpen()
Method called when new device has been opened.void
displayPage(int width, int height, int raster, int format, int copies, int flush, byte[] imageData)
Method called on show page.void
displayPreClose()
Method called when device is about to be closed.void
displayPreSize(int width, int height, int raster, int format)
Method called when device is about to be resized.void
displaySize(int width, int height, int raster, int format)
Method called when device has been resized.void
displaySync()
Method called on page flush.void
displayUpdate(int x, int y, int width, int height)
Method called to notify whenever a portion of the raster is updated.java.util.List<PageRaster>
getRasters()
-
-
-
Field Detail
-
rasters
private java.util.List<PageRaster> rasters
-
-
Method Detail
-
displayClose
public void displayClose() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device has been closed. This is the last event from this device.- Specified by:
displayClose
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayOpen
public void displayOpen() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when new device has been opened. This is the first event from this device.- Specified by:
displayOpen
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayPage
public void displayPage(int width, int height, int raster, int format, int copies, int flush, byte[] imageData) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called on show page.- Specified by:
displayPage
in interfaceDisplayCallback
- Parameters:
width
- Widthheight
- Heightraster
- Rasterformat
- Formatcopies
- Copiesflush
- FlushimageData
- Byte array representing image data. Data layout and order is controlled by the -dDisplayFormat argument.- Throws:
GhostscriptException
-
displayPreClose
public void displayPreClose() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device is about to be closed. Device will not be closed until this function returns.- Specified by:
displayPreClose
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayPreSize
public void displayPreSize(int width, int height, int raster, int format) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device is about to be resized.- Specified by:
displayPreSize
in interfaceDisplayCallback
- Parameters:
width
- Widthheight
- Heightraster
- Rasterformat
- Format- Throws:
GhostscriptException
-
displaySize
public void displaySize(int width, int height, int raster, int format) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called when device has been resized.- Specified by:
displaySize
in interfaceDisplayCallback
- Parameters:
width
- Widthheight
- Heightraster
- Rasterformat
- Format- Throws:
GhostscriptException
-
displaySync
public void displaySync() throws GhostscriptException
Description copied from interface:DisplayCallback
Method called on page flush.- Specified by:
displaySync
in interfaceDisplayCallback
- Throws:
GhostscriptException
-
displayUpdate
public void displayUpdate(int x, int y, int width, int height) throws GhostscriptException
Description copied from interface:DisplayCallback
Method called to notify whenever a portion of the raster is updated.- Specified by:
displayUpdate
in interfaceDisplayCallback
- Parameters:
x
- X coordinatey
- Y coordinatewidth
- Widthheight
- Height- Throws:
GhostscriptException
-
getRasters
public java.util.List<PageRaster> getRasters()
-
-