28fd81dbbdd6d800906d959f82a7d23466e703e1 kate Sun Jan 25 19:33:31 2015 -0800 Make wigLeftLbels respect color param. Needed to force black labels on unaggregated full multiwigs (JK request) diff --git src/hg/hgTracks/wigTrack.c src/hg/hgTracks/wigTrack.c index 004ba17..19803ff 100644 --- src/hg/hgTracks/wigTrack.c +++ src/hg/hgTracks/wigTrack.c @@ -1494,39 +1494,39 @@ int i; /* loop counter */ struct wigCartOptions *wigCart = (struct wigCartOptions *) tg->wigCartData; lines[0] = 0.0; lines[1] = wigCart->yLineMark; if (wigCart->yLineOnOff == wiggleYLineMarkOn) ++numberOfLines; if (withCenterLabels) centerOffset = fontHeight; /* We only do Dense and Full */ if (tg->limitedVis == tvDense) { hvGfxTextRight(hvg, xOff, yOff+centerOffset, width - 1, height-centerOffset, - tg->ixColor, font, shortLabel); + color, font, shortLabel); } else if (tg->limitedVis == tvFull) { int centerLabel = (height/2)-(fontHeight/2); int labelWidth = mgFontStringWidth(font, shortLabel); /* track label is centered in the whole region */ - hvGfxText(hvg, xOff, yOff+centerLabel, tg->ixColor, font, shortLabel); + hvGfxText(hvg, xOff, yOff+centerLabel, color, font, shortLabel); /* Is there room left to draw the min, max ? */ if (showNumbers && height >= (3 * fontHeight)) { boolean zeroOK = TRUE; char upper[SMALLBUF]; char lower[SMALLBUF]; char upperTic = '-'; /* as close as we can get with ASCII */ /* the ideal here would be to draw tic marks in * exactly the correct location. */ Color drawColor; if (withCenterLabels) { centerOffset = fontHeight; @@ -1555,35 +1555,35 @@ { enum wiggleTransformFuncEnum transformFunc = wigCart->transformFunc; boolean gotLog = (transformFunc == wiggleTransformFuncLog); char *transform = (gotLog ? "ln(x+1) " : ""); if (hvg->rc) { safef(upper, sizeof(upper), "%c %s%g", upperTic, transform, graphUpperLimit); safef(lower, sizeof(lower), "_ %g", graphLowerLimit); } else { safef(upper, sizeof(upper), "%s%g %c", transform, graphUpperLimit, upperTic); safef(lower, sizeof(lower), "%g _", graphLowerLimit); } } - drawColor = tg->ixColor; + drawColor = color; if (graphUpperLimit < 0.0) drawColor = tg->ixAltColor; hvGfxTextRight(hvg, xOff, yOff, width - 1, fontHeight, drawColor, font, upper); - drawColor = tg->ixColor; + drawColor = color; if (graphLowerLimit < 0.0) drawColor = tg->ixAltColor; hvGfxTextRight(hvg, xOff, yOff+height-fontHeight, width - 1, fontHeight, drawColor, font, lower); for (i = 0; i < numberOfLines; ++i ) { double lineValue = lines[i]; /* Maybe zero can be displayed */ /* It may overwrite the track label ... */ if (zeroOK && (lineValue < graphUpperLimit) && (lineValue > graphLowerLimit)) { int offset; int Width;