* if columns are all gapped, or sequence has no features, nothing to do
*/
Range visiblePositions = seq.findPositions(start+1, end+1);
- if (visiblePositions == null || !seq.getFeatures().hasFeatures())
+ if (visiblePositions == null || (!seq.getFeatures().hasFeatures()
+ && !av.isShowComplementFeatures()))
{
return null;
}
}
}
+ /*
+ * if configured to do so, find and show complement's features
+ */
+ if (av.isShowComplementFeatures())
+ {
+ AlignViewportI comp = av.getCodingComplement();
+ FeatureRenderer fr2 = Desktop.getAlignFrameFor(comp)
+ .getFeatureRenderer();
+ for (int pos = visiblePositions.start; pos <= visiblePositions.end; pos++)
+ {
+ int column = seq.findIndex(pos);
+ // TODO ensure these are in complement's render order (last on top)
+ List<SequenceFeature> features = fr2
+ .findComplementFeaturesAtResidue(seq, pos);
+ for (SequenceFeature sf : features)
+ {
+ FeatureColourI fc = fr2.getFeatureStyle(sf.getType());
+ Color featureColour = fr2.getColor(sf, fc);
+ renderFeature(g, seq, column - 1, column - 1, featureColour,
+ start, end, y1, colourOnly);
+ }
+ }
+ }
+
if (transparency != 1.0f && g != null)
{
/*