a4adfa326bf8bec73020ee1a8aa0cb6251ea8663 tdreszer Thu Jul 24 11:20:39 2014 -0700 Checking in changes to make 'spectrum' (aka 'useScore') actually work on any pair of color/altColor settings. It used to be that only shadesOfGray, shadesOfBrown and shadesOfSea worked, leaving most cases to be shadesOfGray. I have sat on these changes for months. I am also checking in ifdef'd out code to calc the shade on the fly, rather than relaying on track->colorShades set of precomputed 10 shades. The only reason this code is not used is that it would require changing many many places/uses of colorShades. Since I am bein laid off, it seems inappropriate to make this more dramatic change at this time. diff --git src/hg/hgTracks/chainTrack.c src/hg/hgTracks/chainTrack.c index d875599..43437b0 100644 --- src/hg/hgTracks/chainTrack.c +++ src/hg/hgTracks/chainTrack.c @@ -337,31 +337,31 @@ slSort(&list, chainCmpScore); else slReverse(&list); tg->items = list; /* Clean up. */ sqlFreeResult(&sr); hFreeConn(&conn); } /* chainLoadItems() */ static Color chainScoreColor(struct track *tg, void *item, struct hvGfx *hvg) { struct linkedFeatures *lf = (struct linkedFeatures *)item; -return(tg->colorShades[lf->grayIx]); +return colorBySpectrumOrDefault(hvg,tg,lf->grayIx,0); } static Color chainNoColor(struct track *tg, void *item, struct hvGfx *hvg) { return(tg->ixColor); } static void setNoColor(struct track *tg) { tg->itemColor = chainNoColor; tg->color.r = 0; tg->color.g = 0; tg->color.b = 0; tg->altColor.r = 127; tg->altColor.g = 127;