99bd0979ed59066209b6b964ff17b1a49ef9aeea kent Tue Mar 26 11:00:50 2013 -0700 multiWig.c diff --git src/hg/hgTracks/multiWig.c src/hg/hgTracks/multiWig.c index 3fcfd88..14b6e45 100644 --- src/hg/hgTracks/multiWig.c +++ src/hg/hgTracks/multiWig.c @@ -109,31 +109,31 @@ struct wigGraphOutput *wigGraphOutputTransparent(struct floatPic *image) /* Get appropriate wigGraphOutput for non-transparent rendering */ { struct wigGraphOutput *wgo; AllocVar(wgo); wgo->image = image; wgo->vLine = vLineViaFloat; return wgo; } static void reverseLineOfColors(Color *line, int length) /* Reverse order of colors in line. */ { long halfLen = (length>>1); Color *end = line+length; -char c; +Color c; while (--halfLen >= 0) { c = *line; *line++ = *--end; *end = c; } } void floatPicIntoHvg(struct floatPic *pic, int xOff, int yOff, struct hvGfx *hvg) /* Copy float pic into hvg image at given offset. */ { int width = pic->width, height = pic->height; Color *lineBuf; AllocArray(lineBuf, width); int y; @@ -271,31 +271,34 @@ for (subtrack = tg->subtracks; subtrack != NULL; subtrack = subtrack->next) { if (isSubtrackVisible(subtrack)) { if (!subtrack->networkErrMsg || !errMsgShown) { if (subtrack->networkErrMsg) errMsgShown = TRUE; subtrack->wigGraphOutput = wgo; int height = subtrack->totalHeight(subtrack, vis); hvGfxSetClip(hvg, xOff, y, width, height); if (overlay) subtrack->lineHeight = tg->lineHeight; subtrack->drawItems(subtrack, seqStart, seqEnd, hvg, xOff, y, width, font, color, vis); if (!overlay) + { y += height + 1; + wgo->yOff = y; + } hvGfxUnclip(hvg); } } } if (wigCart->transparent) { floatPicIntoHvg(floatPic, xOff, yOff, hvg); floatPicFree(&floatPic); } char *url = trackUrl(tg->track, chromName); mapBoxHgcOrHgGene(hvg, seqStart, seqEnd, xOff, y, width, tg->height, tg->track, tg->track, NULL, url, TRUE, NULL); }