Color drawnColour = null;
/*
- * iterate over features in ordering of their rendering;
- * if drawing a range of columns, use render order to ensure last is on top
- * if drawing a single column (as in findFeatureColour), with no
- * transparency, work backwards to find the topmost rendered feature colour
+ * iterate over features in ordering of their rendering (last is on top)
*/
for (int renderIndex = 0; renderIndex < renderOrder.length; renderIndex++)
{
continue;
}
+ /*
+ * a feature type may be flagged as shown but the group
+ * an instance of it belongs to may be hidden
+ */
if (featureGroupNotShown(sequenceFeature))
{
continue;
}
/*
- * check feature overlaps the visible part of the alignment,
- * unless doing offscreenRender (to the Overview window or a
- * structure viewer) which is not limited
+ * check feature overlaps the target range
+ * TODO: efficient retrieval of features overlapping a range
*/
if (sequenceFeature.getBegin() > endPos
|| sequenceFeature.getEnd() < startPos)
}
/**
- * calculate the render colour for a specific feature using current feature
- * settings.
+ * Returns the configured colour for a specific feature using current feature
+ * settings. This does not include any consideration of feature visibility,
+ * colour transparency, graduated colour shading etc.
*
* @param feature
- * @return render colour for the given feature
+ * @return
*/
public Color getColour(SequenceFeature feature)
{
featureColours.put(featureType, col);
}
+ @Override
public void setTransparency(float value)
{
transparency = value;
}
+ @Override
public float getTransparency()
{
return transparency;