From 17e4be84d0b44ffdbea126fc3ae9813104689461 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 27 Feb 2015 16:53:27 +0300 Subject: [PATCH] diff: enable AA for separator line over divider --- .../diff/util/DiffLineSeparatorRenderer.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffLineSeparatorRenderer.java b/platform/diff-impl/src/com/intellij/diff/util/DiffLineSeparatorRenderer.java index a00bce96daab..e03d443569fa 100644 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffLineSeparatorRenderer.java +++ b/platform/diff-impl/src/com/intellij/diff/util/DiffLineSeparatorRenderer.java @@ -162,33 +162,33 @@ public class DiffLineSeparatorRenderer implements LineMarkerRenderer, LineSepara yPoints2[index] = yPos2; } - paintLine(g, xPoints1, yPoints1, xPoints2, yPoints2); + GraphicsConfig config = GraphicsUtil.disableAAPainting(g); + try { + paintLine(g, xPoints1, yPoints1, xPoints2, yPoints2); + } + finally { + config.restore(); + } } private static void paintLine(@NotNull Graphics g, @NotNull int[] xPoints1, @NotNull int[] yPoints1, @NotNull int[] xPoints2, @NotNull int[] yPoints2) { - GraphicsConfig config = GraphicsUtil.disableAAPainting(g); - try { - Color innerColor = getInnerColor(); - Color outerColor = getOuterColor(); + Color innerColor = getInnerColor(); + Color outerColor = getOuterColor(); - if (innerColor != null) { - g.setColor(innerColor); - int[] xPoints = mergeReverse(xPoints1, xPoints2); - int[] yPoints = mergeReverse(yPoints1, yPoints2); + if (innerColor != null) { + g.setColor(innerColor); + int[] xPoints = mergeReverse(xPoints1, xPoints2); + int[] yPoints = mergeReverse(yPoints1, yPoints2); - g.fillPolygon(xPoints, yPoints, xPoints.length); - } - if (outerColor != null) { - g.setColor(outerColor); - g.drawPolyline(xPoints1, yPoints1, xPoints1.length); - g.drawPolyline(xPoints2, yPoints2, xPoints2.length); - } + g.fillPolygon(xPoints, yPoints, xPoints.length); } - finally { - config.restore(); + if (outerColor != null) { + g.setColor(outerColor); + g.drawPolyline(xPoints1, yPoints1, xPoints1.length); + g.drawPolyline(xPoints2, yPoints2, xPoints2.length); } }