private static InlineLayoutBox addFirstLetterBox(LayoutContext c, LineBox current, InlineLayoutBox currentIB, LineBreakContext lbContext, int maxAvailableWidth, int remainingWidth) { CalculatedStyle previous = currentIB.getStyle(); currentIB.setStyle(c.getFirstLettersTracker().deriveAll(currentIB.getStyle())); InlineLayoutBox iB = new InlineLayoutBox(c, null, currentIB.getStyle(), maxAvailableWidth); iB.setStartsHere(true); iB.setEndsHere(true); currentIB.addInlineChild(c, iB); current.setContainsContent(true); InlineText text = layoutText(c, iB.getStyle(), remainingWidth, lbContext, true); iB.addInlineChild(c, text); iB.setInlineWidth(text.getWidth()); lbContext.setStart(lbContext.getEnd()); c.getFirstLettersTracker().clearStyles(); currentIB.setStyle(previous); return iB; }
private static InlineLayoutBox addFirstLetterBox(LayoutContext c, LineBox current, InlineLayoutBox currentIB, LineBreakContext lbContext, int maxAvailableWidth, int remainingWidth) { CalculatedStyle previous = currentIB.getStyle(); currentIB.setStyle(c.getFirstLettersTracker().deriveAll(currentIB.getStyle())); InlineLayoutBox iB = new InlineLayoutBox(c, null, currentIB.getStyle(), maxAvailableWidth); iB.setStartsHere(true); iB.setEndsHere(true); currentIB.addInlineChild(c, iB); current.setContainsContent(true); InlineText text = layoutText(c, iB.getStyle(), remainingWidth, lbContext, true); iB.addInlineChild(c, text); iB.setInlineWidth(text.getWidth()); lbContext.setStart(lbContext.getEnd()); c.getFirstLettersTracker().clearStyles(); currentIB.setStyle(previous); return iB; }
currentIB.setEndsHere(true);