(final Booklet booklet, final PageState ip)
| 31 | private ImageRegion imageRegion = null; |
| 32 | |
| 33 | public TextPage(final Booklet booklet, final PageState ip) { |
| 34 | this.booklet = booklet; |
| 35 | |
| 36 | final int width = booklet.width; |
| 37 | final int height = booklet.height; |
| 38 | |
| 39 | // App Settings |
| 40 | final AlbiteFont fontPlain = booklet.fontPlain; |
| 41 | final AlbiteFont fontItalic = booklet.fontItalic; |
| 42 | final int spaceWidth = fontPlain.charWidth(' '); |
| 43 | |
| 44 | //#debug |
| 45 | AlbiteMIDlet.LOGGER.log("Spacewidth: " + spaceWidth); |
| 46 | |
| 47 | int dashWidth = 0; |
| 48 | final int fontHeight = booklet.fontHeight; |
| 49 | final int fontHeightX2 = 2 * fontHeight; |
| 50 | final int fontIndent = booklet.fontIndent; |
| 51 | //#if !(TinyMode || TinyModeExport || LightMode || LightModeExport) |
| 52 | final ZLTextTeXHyphenator hyphenator = booklet.hyphenator; |
| 53 | //#endif |
| 54 | |
| 55 | // Chapter settings |
| 56 | final String chapterPath = booklet.getChapter().getPath(); |
| 57 | final char[] buffer = booklet.getTextBuffer(); |
| 58 | final int bufferSize; |
| 59 | final Archive bookFile = booklet.bookArchive; |
| 60 | final Vector images = ip.images; |
| 61 | |
| 62 | byte style; |
| 63 | boolean center; |
| 64 | byte color; |
| 65 | |
| 66 | AlbiteFont font; |
| 67 | |
| 68 | HyphenatedTextRegion lastHyphenatedWord; |
| 69 | boolean startsNewParagraph; |
| 70 | |
| 71 | TextParser parser = ip.parser; |
| 72 | int wordPixelWidth; //word width in pixels |
| 73 | |
| 74 | Vector wordsOnThisLine = new Vector(20); //RegionTexts |
| 75 | |
| 76 | boolean firstWord; |
| 77 | |
| 78 | int posX = 0; |
| 79 | int posY = 0; |
| 80 | |
| 81 | Vector regionsTemp; |
| 82 | |
| 83 | if (images.isEmpty()) { |
| 84 | //text mode |
| 85 | regionsTemp = new Vector(300); |
| 86 | |
| 87 | parser.position = end = start = ip.position; |
| 88 | parser.length = ip.length; |
| 89 | |
| 90 | bufferSize = buffer.length; |
nothing calls this directly
no test coverage detected