if (line.firstLinePseudo != null) { line.firstLinePseudo.paintTextDecoration(c, line, inline); line.firstLinePseudo.untranslateRelative(c, line.isFirstLine); }
    static int paintInline(RenderingContext c, InlineBox ib, int lx, int ly, LineBox line, int padX) {        if (ib.pushstyles > 0)            padX = ib.getInlineElement().handleStart(c, line, ib, padX, ib.pushstyles);        if (ib instanceof InlineBlockBox) {            c.translate(line.x,                    line.y +                    (line.getBaseline() -                    VerticalAlign.getBaselineOffset(c, line, ib, c.getTextRenderer(), c.getGraphics(), c.getBlockFormattingContext()) -                    ib.height));            c.translate(ib.x, ib.y);            BoxRendering.paint(c, ((InlineBlockBox) ib).sub_block);            c.translate(-ib.x, -ib.y);            c.translate(-line.x,                    -(line.y +                    (line.getBaseline() -                    VerticalAlign.getBaselineOffset(c, line, ib, c.getTextRenderer(), c.getGraphics(), c.getBlockFormattingContext()) -                    ib.height)));            debugInlines(c, ib, lx, ly);        } else {            InlineTextBox inline = (InlineTextBox) ib;            //Uu.p("inline = " + inline);            //Uu.p("line.x = " + line.x + " lx = " + lx);            //Uu.p("ib.x .y = " + ib.x + " " + ib.y);            c.updateSelection(inline);            // calculate the Xx and y relative to the baseline of the line (ly) and the            // left edge of the line (lx)            int iy = ly - VerticalAlign.getBaselineOffset(c, line, inline, c.getTextRenderer(), c.getGraphics(), c.getBlockFormattingContext());            int ix = lx + inline.x;//TODO: find the right way to work this out            // account for padding            // Uu.p("adjusted inline by: " + inline.totalLeftPadding());            // Uu.p("inline = " + inline);            // Uu.p("padding = " + inline.padding);            // JMM: new adjustments to move the text to account for horizontal insets            //int padding_xoff = inline.totalLeftPadding(c.getCurrentStyle());            c.translate(padX, 0);            LineMetrics lm = FontUtil.getLineMetrics(inline.getStyle().getFont(c), inline, c.getTextRenderer(), c.getGraphics());            paintBackground(c, line, inline);            if (inline.getInlineElement() != null) inline.getInlineElement().translateRelative(c, line.isFirstLine);            paintSelection(c, inline, lx, ly, lm);            paintText(c, ix, iy, inline, lm);            if (inline.getInlineElement() != null) inline.getInlineElement().untranslateRelative(c, line.isFirstLine);            //TODO: handle Block element text decorations            if (inline.getInlineElement() != null) {                inline.getInlineElement().paintTextDecoration(c, line, inline);                inline.getInlineElement().untranslateRelative(c, line.isFirstLine);            }            c.translate(-padX, 0);            debugInlines(c, inline, lx, ly);        }        padX = ib.getWidth() - ib.rightPadding;        if (ib.popstyles > 0)            padX = ib.getInlineElement().handleEnd(c, line, ib, padX, ib.popstyles);        return padX;    }