int totalLineWidth = InlineBoxing.positionHorizontally(c, lineBox, 0); lineBox.setContentWidth(totalLineWidth);
int totalLineWidth = InlineBoxing.positionHorizontally(c, lineBox, 0); lineBox.setContentWidth(totalLineWidth);
current.prunePendingInlineBoxes(); int totalLineWidth = positionHorizontally(c, current, 0); current.setContentWidth(totalLineWidth);
current.prunePendingInlineBoxes(); int totalLineWidth = positionHorizontally(c, current, 0); current.setContentWidth(totalLineWidth);
public static int positionHorizontally(CssContext c, Box current, int start) { int x = start; InlineLayoutBox currentIB = null; if (current instanceof InlineLayoutBox) { currentIB = (InlineLayoutBox)current; x += currentIB.getLeftMarginBorderPadding(c); } for (int i = 0; i < current.getChildCount(); i++) { Box b = current.getChild(i); if (b instanceof InlineLayoutBox) { InlineLayoutBox iB = (InlineLayoutBox) current.getChild(i); iB.setX(x); x += positionHorizontally(c, iB, x); } else { b.setX(x); x += b.getWidth(); } } if (currentIB != null) { x += currentIB.getRightMarginPaddingBorder(c); currentIB.setInlineWidth(x - start); } return x - start; }
public static int positionHorizontally(CssContext c, Box current, int start) { int x = start; InlineLayoutBox currentIB = null; if (current instanceof InlineLayoutBox) { currentIB = (InlineLayoutBox)current; x += currentIB.getLeftMarginBorderPadding(c); } for (int i = 0; i < current.getChildCount(); i++) { Box b = current.getChild(i); if (b instanceof InlineLayoutBox) { InlineLayoutBox iB = (InlineLayoutBox) current.getChild(i); iB.setX(x); x += positionHorizontally(c, iB, x); } else { b.setX(x); x += b.getWidth(); } } if (currentIB != null) { x += currentIB.getRightMarginPaddingBorder(c); currentIB.setInlineWidth(x - start); } return x - start; }
private static int positionHorizontally(CssContext c, InlineLayoutBox current, int start) { int x = start; x += current.getLeftMarginBorderPadding(c); for (int i = 0; i < current.getInlineChildCount(); i++) { Object child = current.getInlineChild(i); if (child instanceof InlineLayoutBox) { InlineLayoutBox iB = (InlineLayoutBox) child; iB.setX(x); x += positionHorizontally(c, iB, x); } else if (child instanceof InlineText) { InlineText iT = (InlineText) child; iT.setX(x - start); x += iT.getWidth(); } else if (child instanceof Box) { Box b = (Box) child; b.setX(x); x += b.getWidth(); } } x += current.getRightMarginPaddingBorder(c); current.setInlineWidth(x - start); return x - start; }
private static int positionHorizontally(CssContext c, InlineLayoutBox current, int start) { int x = start; x += current.getLeftMarginBorderPadding(c); for (int i = 0; i < current.getInlineChildCount(); i++) { Object child = current.getInlineChild(i); if (child instanceof InlineLayoutBox) { InlineLayoutBox iB = (InlineLayoutBox) child; iB.setX(x); x += positionHorizontally(c, iB, x); } else if (child instanceof InlineText) { InlineText iT = (InlineText) child; iT.setX(x - start); x += iT.getWidth(); } else if (child instanceof Box) { Box b = (Box) child; b.setX(x); x += b.getWidth(); } } x += current.getRightMarginPaddingBorder(c); current.setInlineWidth(x - start); return x - start; }
public void paintInline(RenderingContext c) { if (! getParent().getStyle().isVisible()) { return; } if (isContainsDynamicFunction()) { lookForDynamicFunctions(c); int totalLineWidth = InlineBoxing.positionHorizontally(c, this, 0); setContentWidth(totalLineWidth); calcChildLocations(); align(true); calcPaintingInfo(c, false); } if (_textDecorations != null) { c.getOutputDevice().drawTextDecoration(c, this); } if (c.debugDrawLineBoxes()) { c.getOutputDevice().drawDebugOutline(c, this, FSRGBColor.GREEN); } }
public void paintInline(RenderingContext c) { if (! getParent().getStyle().isVisible()) { return; } if (isContainsDynamicFunction()) { lookForDynamicFunctions(c); int totalLineWidth = InlineBoxing.positionHorizontally(c, this, 0); setContentWidth(totalLineWidth); calcChildLocations(); align(true); calcPaintingInfo(c, false); } if (_textDecorations != null) { c.getOutputDevice().drawTextDecoration(c, this); } if (c.debugDrawLineBoxes()) { c.getOutputDevice().drawDebugOutline(c, this, FSRGBColor.GREEN); } }