fixed incorrect scaled icon painting
authorEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 22 May 2015 10:50:10 +0000 (13:50 +0300)
committerEgor.Ushakov <egor.ushakov@jetbrains.com>
Fri, 22 May 2015 12:43:20 +0000 (15:43 +0300)
platform/core-api/src/com/intellij/util/IconUtil.java

index 78c7c4d387526774b0a9dedded5098d5724be0b7..88a964c3e3f9b701c5a777e770fcd06539033888 100644 (file)
@@ -395,11 +395,12 @@ public class IconUtil {
       public void paintIcon(Component c, Graphics g, int x, int y) {
         Graphics2D g2d = (Graphics2D)g.create();
         try {
+          g2d.translate(x, y);
           AffineTransform transform = AffineTransform.getScaleInstance(scale, scale);
           transform.preConcatenate(g2d.getTransform());
           g2d.setTransform(transform);
           g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
-          source.paintIcon(c, g2d, x, y);
+          source.paintIcon(c, g2d, 0, 0);
         } finally {
           g2d.dispose();
         }