From 94bf79437b377c8da9a9b78757bb6639a8fae2f5 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 22 Aug 2017 11:37:03 +0100 Subject: [PATCH] JAL-1950 patch after merge --- src/jalview/schemes/AnnotationColourGradient.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index f646963..3ed18bf 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -197,7 +197,7 @@ public class AnnotationColourGradient extends FollowerColourScheme } else { - seqannot = new IdentityHashMap(); + seqannot = new IdentityHashMap<>(); } // resolve the context containing all the annotation for the sequence AnnotatedCollectionI alcontext = alignment instanceof AlignmentI @@ -482,8 +482,9 @@ public class AnnotationColourGradient extends FollowerColourScheme trans = (int) ((1f - range) * midtr); range = (float) ((annotation.score - plmin) / (plmax - aamin)); } - int dr = (int) (rr * range + r1), dg = (int) (gg * range + g1), db = (int) (bb - * range + b1); + int dr = (int) (redRange * range + redMin), + dg = (int) (greenRange * range + greenMin), + db = (int) (blueRange * range + blueMin); if (annotation.score == annotation.score && positionToTransparency) { return new Color(Math.min(dr + trans, midtr), Math.min(dg -- 1.7.10.2