Package com.openhtmltopdf.layout
Class BlockFormattingContext
java.lang.Object
com.openhtmltopdf.layout.BlockFormattingContext
public class BlockFormattingContext extends Object
This class represents a block formatting context as defined in the CSS spec.
Its main purpose is to provide BFC relative coordinates for a
FloatManager.
This coordinate space is used when positioning floats and calculating the
amount of space floated boxes take up at a given y position.
NOTE: The translate(int, int) method must be called when a
block box in the normal flow is moved (i.e. its static position changes)-
Constructor Summary
Constructors Constructor Description BlockFormattingContext(BlockBox block, LayoutContext c) -
Method Summary
Modifier and Type Method Description voidclear(LayoutContext c, Box current)voidfloatBox(LayoutContext c, BlockBox floated)intgetFloatDistance(CssContext cssCtx, LineBox line, int containingBlockWidth)FloatManagergetFloatManager()intgetLeftFloatDistance(CssContext cssCtx, LineBox line, int containingBlockWidth)intgetNextLineBoxDelta(CssContext cssCtx, LineBox line, int containingBlockWidth)PointgetOffset()intgetRightFloatDistance(CssContext cssCtx, LineBox line, int containingBlockWidth)StringtoString()voidtranslate(int x, int y)