1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

BookElement rendering (in progress)

This commit is contained in:
Nikolay Pultsin 2014-12-22 05:13:23 +00:00
parent 1c23997bf9
commit 7ac8221a7b
2 changed files with 14 additions and 0 deletions

View file

@ -19,5 +19,10 @@
package org.geometerplus.zlibrary.text.view;
import org.geometerplus.zlibrary.core.image.ZLImageData;
public final class BookElement extends ZLTextElement {
public ZLImageData getImageData() {
return null;
}
}

View file

@ -23,6 +23,8 @@ import java.util.*;
import org.geometerplus.zlibrary.core.application.ZLApplication;
import org.geometerplus.zlibrary.core.filesystem.ZLFile;
import org.geometerplus.zlibrary.core.image.ZLImageData;
import org.geometerplus.zlibrary.core.library.ZLibrary;
import org.geometerplus.zlibrary.core.util.RationalNumber;
import org.geometerplus.zlibrary.core.util.ZLColor;
import org.geometerplus.zlibrary.core.view.ZLPaintContext;
@ -939,6 +941,13 @@ public abstract class ZLTextView extends ZLTextViewBase {
final int c = yStart + (yEnd - yStart) / 2;
context.setFillColor(new ZLColor(196, 196, 196));
context.fillPolygon(new int[] { l, l, r }, new int[] { t, b, c });
} else if (element instanceof BookElement) {
final int vMargin = ZLibrary.Instance().getDisplayDPI() / 15;
final int hMargin = ZLibrary.Instance().getDisplayDPI() / 10;
final ZLImageData imageData = ((BookElement)element).getImageData();
if (imageData != null) {
} else {
}
} else if (element == ZLTextElement.HSpace) {
final int cw = context.getSpaceWidth();
/*