+ // next profl[] position is profile % for the character(s)
+ scl = htn * scale * profl[c++];
+ lm = ofont.getLineMetrics(dc, 0, 1, g.getFontMetrics()
+ .getFontRenderContext());
+ g.setFont(ofont.deriveFont(AffineTransform.getScaleInstance(
+ wdth, scl / lm.getAscent())));
+ lm = g.getFontMetrics().getLineMetrics(dc, 0, 1, g);
+
+ // Debug - render boxes around characters
+ // g.setColor(Color.red);
+ // g.drawRect(x*av.charWidth, (int)ht, av.charWidth,
+ // (int)(scl));
+ // g.setColor(profcolour.findColour(dc[0]).darker());
+
+ /*
+ * Set character colour as per alignment colour scheme; use the
+ * codon translation if a cDNA profile
+ */
+ Color colour = null;
+ if (isCdnaProfile)
+ {
+ final String codonTranslation = ResidueProperties
+ .codonTranslate(new String(dc));
+ colour = profcolour.findColour(codonTranslation.charAt(0),
+ column, null);
+ }
+ else