if (doTextDecorations) paintTextDecoration(style, c, line, start, width);
    private void paint(RenderingContext c,                       LineBox line,                       InlineBox inline,                       int start,                       int width,                       int sides, boolean doTextDecorations) {        Style style;        if (line.isFirstLine || endStyle == null) {//endStyle can be null if layout is not complete            style = startStyle;        } else {            style = endStyle;        }        CalculatedStyle cs = style.getCalculatedStyle();        //recurse for TOP and BOTTOM only!        if (parent != null) {            //these will all do the relevant translates            parent.paint(c, line, inline, start, width, BorderPainter.BOTTOM + BorderPainter.TOP, doTextDecorations);        }        Relative.translateRelative(c, cs, true);        Color background_color = cs.getBackgroundColor();        int parent_width = line.getParent().getWidth();        RectPropertySet margin = cs.getMarginRect(parent_width, parent_width, c);        BorderPropertySet border = cs.getBorder(c);        RectPropertySet padding = cs.getPaddingRect(parent_width, parent_width, c);        LineMetrics lm = FontUtil.getLineMetrics(inline.getStyle().getFont(c), inline, c.getTextRenderer(), c.getGraphics());        int ty = line.getBaseline() - inline.y - inline.height - (int) margin.top() - (int) border.top() - (int) padding.top() + line.y;        ty += (int) lm.getDescent();        c.translate(0, ty);        c.getGraphics().translate(0, ty);        // CLEAN: cast to int        Rectangle bounds = new Rectangle(start,                inline.y + (int) margin.top(),                width,                inline.height + (int) border.top() + (int) padding.top() + (int) padding.bottom() + (int) border.bottom());        //first the background        if (background_color != null) {            // skip transparent background            if (!background_color.equals(BackgroundPainter.transparent)) {                //TODO. make conf controlled Uu.p("filling a background");                c.getGraphics().setColor(background_color);                c.getGraphics().fillRect(bounds.x, bounds.y, bounds.width, bounds.height);            }        }        //then the border        BorderPainter.paint(bounds, sides, cs, c.getGraphics(), c, xOffset);        //and text decorations        if (doTextDecorations) paintTextDecoration(style, c, line, start, width);        c.getGraphics().translate(0, -ty);        c.translate(0, -ty);        xOffset += inline.contentWidth;    }