Project: Birt
Bug 180846 Implement page emitter framework.
Reported: 2007-04-03 23:01:06 | Status: resolved fixed

Implement page emitter framework to layout engine. The framework was designed before postscript emitter was implemented. The outline of the framework is as following: 1. PageDeviceRender determines if new pages should be created and how to compute absolute position where items should be rendered in a page. 2. If a new page need to be created, PageDeviceRender informs the page device (an instance of IPagableDevice) to create a new page which is an instance of IPage. 3. When an item need be rendered in a page, PageDeviceRender computes absolute position of the item in the page and inform the page (IPage) to render the item at the position. 4. As a protocol, position is represented as coordinates, height and width in a coordinate system with origin at the left upper corner. For a specific emitter, the coordinates, height and width should be converted according to the special coordinate system of the emitter. Under this framework, algorithm of computing position is reused and emitters needn't to compute the absolute position by itself. Instead, it only needs to provide algorithm about how to create new pages and how to render items at specified position in a page. Postscript emitter is implemented under this framework, while the framework should be immigated into layout engine so that all page-emitter (pdf, postscript, etc.) can use this framework.

Files changed in fix:
engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFEmitter.java engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPage.java engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFPageDevice.java engine/org.eclipse.birt.report.engine.emitter.pdf/src/org/eclipse/birt/report/engine/emitter/pdf/PDFRender.java engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/PostscriptEmitter.java engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/PostscriptRender.java engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/PostscriptRenderOption.java engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/PostscriptWriter.java engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/device/PostscriptPage.java engine/org.eclipse.birt.report.engine.emitter.postscript/src/org/eclipse/birt/report/engine/emitter/postscript/device/PostscriptPageDevice.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/emitter/EngineEmitterServices.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/OnPageBreakLayoutPageHandle.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/TextStyle.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/area/IAreaVisitor.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/area/impl/ContainerArea.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/emitter/IPage.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/emitter/IPageDevice.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/emitter/PageDeviceRender.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/emitter/PageEmitter.java engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/layout/pdf/font/FontInfo.java