- Color featureColour = fc.getColor(sf);
- int visibleStart = Math.max(sf.getBegin(),
- visiblePositions.getBegin());
+ Color featureColour = getColor(sf, fc);
+ if (featureColour == null)
+ {
+ /*
+ * feature excluded by visibility settings, filters, or colour threshold
+ */
+ continue;
+ }
+
+ /*
+ * if feature starts/ends outside the visible range,
+ * restrict to visible positions (or if a contact feature,
+ * to a single position)
+ */
+ int visibleStart = sf.getBegin();
+ if (visibleStart < visiblePositions.getBegin())
+ {
+ visibleStart = sf.isContactFeature() ? sf.getEnd()
+ : visiblePositions.getBegin();
+ }
+ int visibleEnd = sf.getEnd();
+ if (visibleEnd > visiblePositions.getEnd())
+ {
+ visibleEnd = sf.isContactFeature() ? sf.getBegin()
+ : visiblePositions.getEnd();
+ }
+