/** * Delegates the painting of the quick diff colors to this painter. The painter will draw the * color boxes onto the passed {@link GC} for all model (document) lines in * <code>visibleModelLines</code>. * * @param gc the {@link GC} to draw onto * @param visibleModelLines the lines (in document offsets) that are currently (perhaps only * partially) visible */ public void paint(GC gc, ILineRange visibleModelLines) { connectIfNeeded(); if (!isConnected()) return; // draw diff info final int lastLine= end(visibleModelLines); final int width= getWidth(); final Color deletionColor= getDeletionColor(); for (int line= visibleModelLines.getStartLine(); line < lastLine; line++) { paintLine(line, gc, width, deletionColor); } }
/** * Delegates the painting of the quick diff colors to this painter. The painter will draw the * color boxes onto the passed {@link GC} for all model (document) lines in * <code>visibleModelLines</code>. * * @param gc the {@link GC} to draw onto * @param visibleModelLines the lines (in document offsets) that are currently (perhaps only * partially) visible */ public void paint(GC gc, ILineRange visibleModelLines) { connectIfNeeded(); if (!isConnected()) return; // draw diff info final int lastLine= end(visibleModelLines); final int width= getWidth(); final Color deletionColor= getDeletionColor(); for (int line= visibleModelLines.getStartLine(); line < lastLine; line++) { paintLine(line, gc, width, deletionColor); } }