JAL-3858 improved contactInterval computation and added detailed test coverage for...
[jalview.git] / src / jalview / renderer / ContactMapRenderer.java
index d1eb2f4..af8838c 100644 (file)
@@ -178,14 +178,14 @@ public abstract class ContactMapRenderer implements AnnotationRowRendererI
       for (int ht = 0, botY = topY
               - _aa.height; ht < _aa.graphHeight; ht += cgeom.pixels_step)
       {
-        ContactGeometry.contactInterval ci = cgeom.mapFor(ht,
-                ht + cgeom.pixels_step);
+        ContactGeometry.contactInterval ci = cgeom.mapFor(ht);
         // cstart = (int) Math.floor(((double) y2 - ht) * contacts_per_pixel);
         // cend = (int) Math.min(contact_height,
         // Math.ceil(cstart + contacts_per_pixel * pixels_step));
 
         Color col;
-        boolean rowsel = false, containsHidden = false;
+        boolean rowsel = false;
+        boolean containsHidden = false;
         if (columnSelection != null)
         {
           rowsel = cgeom.intersects(ci, columnSelection, hiddenColumns,
@@ -226,7 +226,7 @@ public abstract class ContactMapRenderer implements AnnotationRowRendererI
         g.setColor(col);
         if (cgeom.pixels_step > 1)
         {
-          g.fillRect(x * charWidth, botY+ht, charWidth, 1 + cgeom.pixels_step);
+          g.fillRect(x * charWidth, botY+ht, charWidth, cgeom.pixels_step);
         }
         else
         {