a9b305111677c9a10022ef27ab71924e45c1f05b braney Mon Feb 28 14:28:52 2011 -0800 backing out pointing things on decipher blocks #1953 diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index b63e442..d80d14d 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -5237,64 +5237,41 @@ sqlFreeResult(&sr); } } hFreeConn(&conn); return(col); } static void decipherDrawAt(struct track *tg, void *item, struct hvGfx *hvg, int xOff, int y, double scale, MgFont *font, Color color, enum trackVisibility vis) /* Draw a single superfamily item at position. */ { struct bed *bed = item; char *sPhenotypes; int heightPer = tg->heightPer; -int start = bed->chromStart; -if (start < winStart) - start = winStart; -int end = bed->chromEnd; -if (end > winEnd) - end = winEnd; -int x1 = round((double)((int)start-winStart)*scale) + xOff; -int x2 = round((double)((int)end-winStart)*scale) + xOff; +int x1 = round((double)((int)bed->chromStart-winStart)*scale) + xOff; +int x2 = round((double)((int)bed->chromEnd-winStart)*scale) + xOff; int w; sPhenotypes = decipherPhenotypeList(tg, item); w = x2-x1; - if (w < 1) w = 1; if (color) { - void drawTri(struct hvGfx *hvg, int x, int y1, int y2, Color color, char strand); - int ourX = x1; - int ourW = w; - if (bed->chromStart < winStart) - { - assert(x1 == xOff); - ourX += heightPer/2; - ourW -= heightPer/2; - drawTri(hvg, xOff, y, y + heightPer -1,decipherColor(tg, item, hvg), '-'); - } - - if (bed->chromEnd > winEnd) - { - ourW -= heightPer/2; - drawTri(hvg, x2 - heightPer/2, y, y + heightPer -1,decipherColor(tg, item, hvg), '+'); - } - hvGfxBox(hvg, ourX, y, ourW, heightPer, decipherColor(tg, item, hvg)); + hvGfxBox(hvg, x1, y, w, heightPer, decipherColor(tg, item, hvg)); if (vis == tvFull) { hvGfxTextRight(hvg, x1-mgFontStringWidth(font, sPhenotypes)-2, y, mgFontStringWidth(font, sPhenotypes), heightPer, MG_BLACK, font, sPhenotypes); } if (tg->drawName && vis != tvSquish) { /* Clip here so that text will tend to be more visible... */ char *s = tg->itemName(tg, bed); w = x2-x1; if (w > mgFontStringWidth(font, s)) { Color textColor = hvGfxContrastingColor(hvg, color); @@ -10006,31 +9983,31 @@ tg->itemNameColor = cactusNameColor; tg->drawLeftLabels = cactusLeftLabels; } void blastMethods(struct track *tg) /* blast protein track methods */ { tg->loadItems = loadBlast; tg->itemName = refGeneName; tg->mapItemName = refGeneMapName; tg->itemColor = blastColor; tg->itemNameColor = blastNameColor; } -void drawTri(struct hvGfx *hvg, int x, int y1, int y2, Color color, +static void drawTri(struct hvGfx *hvg, int x, int y1, int y2, Color color, char strand) /* Draw traingle. */ { struct gfxPoly *poly = gfxPolyNew(); int half = (y2 - y1) / 2; if (strand == '-') { gfxPolyAddPoint(poly, x, y1+half); gfxPolyAddPoint(poly, x+half, y1); gfxPolyAddPoint(poly, x+half, y2); } else { gfxPolyAddPoint(poly, x, y1); gfxPolyAddPoint(poly, x+half, y1+half);