/** Buffer for background and images. */
private StringBuffer[] decoData;
+ /** Leading of line containing Courier font size of 10pt. */
+ public static final int LINE_LEADING = 1070;
+
/** Height of one symbol in Courier font size of 10pt. */
public static final int CHAR_HEIGHT = 7860;
*/
protected void renderText(TextArea area) {
int col = Helper.ceilPosition(this.currentIPPosition, CHAR_WIDTH);
- int row = Helper.ceilPosition(this.currentBPPosition, CHAR_HEIGHT);
+ int row = Helper.ceilPosition(this.currentBPPosition - LINE_LEADING, CHAR_HEIGHT + 2*LINE_LEADING);
String s = area.getText();
double height = bounds.getHeight();
pageWidth = Helper.ceilPosition((int) width, CHAR_WIDTH);
- pageHeight = Helper.ceilPosition((int) height, CHAR_HEIGHT);
+ pageHeight = Helper.ceilPosition((int) height, CHAR_HEIGHT + 2*LINE_LEADING);
// init buffers
charData = new StringBuffer[pageHeight];
*/
public void renderImage(Image image, Rectangle2D pos) {
int x1 = Helper.ceilPosition(currentIPPosition, CHAR_WIDTH);
- int y1 = Helper.ceilPosition(currentBPPosition, CHAR_HEIGHT);
+ int y1 = Helper.ceilPosition(currentBPPosition - LINE_LEADING, CHAR_HEIGHT + 2*LINE_LEADING);
int width = Helper.ceilPosition((int) pos.getWidth(), CHAR_WIDTH);
- int height = Helper.ceilPosition((int) pos.getHeight(), CHAR_HEIGHT);
+ int height = Helper.ceilPosition((int) pos.getHeight(), CHAR_HEIGHT + 2*LINE_LEADING);
fillRect(x1, y1, width, height, IMAGE_CHAR);
}
protected void drawBackAndBorders(Area area, float startx, float starty,
float width, float height) {
bm.setWidth(Helper.ceilPosition(toMilli(width), CHAR_WIDTH));
- bm.setHeight(Helper.ceilPosition(toMilli(height), CHAR_HEIGHT));
+ bm.setHeight(Helper.ceilPosition(toMilli(height), CHAR_HEIGHT + 2*LINE_LEADING));
bm.setStartX(Helper.ceilPosition(toMilli(startx), CHAR_WIDTH));
- bm.setStartY(Helper.ceilPosition(toMilli(starty), CHAR_HEIGHT));
+ bm.setStartY(Helper.ceilPosition(toMilli(starty), CHAR_HEIGHT + 2*LINE_LEADING));
super.drawBackAndBorders(area, startx, starty, width, height);
}
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
- <action context="Code" dev="PH" type="add" fixes-bug="49893">
- A global setting to wrap F11 images in page segments.
- </action>
+ <action context="Code" dev="GA" type="fix" fixes-bug="52114">
+ Take leading derived space before/after into account when computing rows for TXT renderer.
+ </action>
+ <action context="Code" dev="GA" type="fix" fixes-bug="52763">
+ Support list-block in marker, thus preventing NPE.
+ </action>
<action context="Code" dev="GA" type="fix" fixes-bug="52763">
Support list-block in marker, thus preventing NPE.
</action>