From: Ben Soares Date: Wed, 31 Jan 2024 17:03:39 +0000 (+0000) Subject: JAL-4375 More consistent calculation for dashed threshold line X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a0ccef9cc78fffa7be85f3b658a5768958a301ce;p=jalview.git JAL-4375 More consistent calculation for dashed threshold line --- 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,