230b2b23ed69e202ac634bb16c62a833354f2fcd max Tue Dec 9 13:18:48 2014 -0800 new tdb statement "labelOnFeature", refs #14512 diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index da5776d..095e2d1 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -239,30 +239,31 @@ * with multiple alignments. The resulting value should *not* be freed, * and it should be assumed that it might only remain valid for a short * period of time.*/ int loadTime; /* Time it takes to load (for performance tuning) */ int drawTime; /* Time it takes to draw (for performance tuning) */ enum enumBool remoteDataSource; /* The data for this track is from a remote source */ /* Slow retrieval means image can be rendered via an AJAX callback. */ boolean customTrack; /* Need to explicitly declare this is a custom track */ boolean syncChildVisToSelf; /* If TRUE sync visibility to of children to self. */ char *networkErrMsg; /* Network layer error message */ boolean parallelLoading; /* If loading in parallel, usually network resources. */ struct bbiSummaryElement *summary; /* for bigBed */ struct bbiSummaryElement *sumAll; /* for bigBid */ + boolean drawLabelInBox; /* draw labels into the features instead of next to them */ }; typedef void (*TrackHandler)(struct track *tg); int trackPriCmp(const void *va, const void *vb); /* Compare for sort based on priority */ boolean trackIsCompositeWithSubtracks(struct track *track); /* Temporary function until all composite tracks point to their own children */ struct trackRef /* A reference to a track. */ { struct trackRef *next; /* Next in list. */ @@ -1093,30 +1094,35 @@ void makeRedGreenShades(struct hvGfx *hvg); /* Makes some colors for the typical red/green microarray spectrum. */ void linkedFeaturesSeriesMethods(struct track *tg); void lfsMapItemName(struct track *tg, struct hvGfx *hvg, void *item, char *itemName, char *mapItemName, int start, int end, int x, int y, int width, int height); void drawScaledBoxSample(struct hvGfx *hvg, int chromStart, int chromEnd, double scale, int xOff, int y, int height, Color color, int score); /* Draw a box scaled from chromosome to window coordinates. */ +void drawScaledBoxSampleLabel(struct hvGfx *hvg, + int chromStart, int chromEnd, double scale, + int xOff, int y, int height, Color color, MgFont *font, char *label); +/* Draw a box scaled from chromosome to window coordinates and draw a label onto it. */ + struct track *trackFromTrackDb(struct trackDb *tdb); /* Create a track based on the tdb */ int spreadStringCharWidth(int width, int count); Color getOrangeColor(); /* Return color used for insert indicators in multiple alignments */ Color getBlueColor(); Color getChromBreakBlueColor(); Color getChromBreakGreenColor(); void linkedFeaturesDrawAt(struct track *tg, void *item, struct hvGfx *hvg, int xOff, int y, double scale, MgFont *font, Color color, enum trackVisibility vis);