From a0ccef9cc78fffa7be85f3b658a5768958a301ce Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Wed, 31 Jan 2024 17:03:39 +0000 Subject: [PATCH] JAL-4375 More consistent calculation for dashed threshold line --- src/jalview/renderer/AnnotationRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 3b5d656..f733875 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -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, -- 1.7.10.2