JAL-4375 More consistent calculation for dashed threshold line
[jalview.git] / src / jalview / renderer / AnnotationRenderer.java
index 3b5d656..f733875 100644 (file)
@@ -1484,8 +1484,8 @@ public class AnnotationRenderer
   {
     if (!dashedLineLookup.containsKey(charWidth))
     {
-      int power2 = charWidth >= 16 ? (int) (Math.log(charWidth) / log2) : 2;
-      float width = ((float) charWidth) / ((float) Math.pow(2, power2 - 2));
+      int power2 = charWidth >= 8 ? (int) (Math.log(charWidth) / log2) : 2;
+      float width = ((float) charWidth) / ((float) Math.pow(2, power2 - 3));
       float segment1 = width * 0.6f;
       float segment2 = width - segment1;
       dashedLineLookup.put(charWidth, new BasicStroke(1,