9944d8c4a72a426a07ed2d33a5ea535811dd4461 galt Sun Feb 7 23:26:52 2016 -0800 Issue 16666. Makes autoscale work with multi-region for wig, bedGraph, bigWig, and multiWig. doWiggle still TODO. diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h index bff5fc8..d7e10a4 100644 --- src/hg/hgTracks/hgTracks.h +++ src/hg/hgTracks/hgTracks.h @@ -95,30 +95,38 @@ /* Return name to associate on map. */ int (*totalHeight)(struct track *tg, enum trackVisibility vis); /* Return total height. Called before and after drawItems. * Must set the following variables. */ int height; /* Total height - must be set by above call. */ int lineHeight; /* Height per item line including border. */ int heightPer; /* Height per item line minus border. */ int (*itemHeight)(struct track *tg, void *item); /* Return height of one item. */ int (*itemRightPixels)(struct track *tg, void *item); /* Return number of pixels needed to right of item for additional labeling. (Optional) */ + void (*preDrawMultiRegion)(struct track *tg); + /* Handle multi-region issues after predraw and before draw such as autoScale for wigs. */ + + void (*preDrawItems)(struct track *tg, int seqStart, int seqEnd, + struct hvGfx *hvg, int xOff, int yOff, int width, + MgFont *font, Color color, enum trackVisibility vis); + /* Do PreDraw item list, one per track. */ + void (*drawItems)(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis); /* Draw item list, one per track. */ void (*drawItemAt)(struct track *tg, void *item, struct hvGfx *hvg, int xOff, int yOff, double scale, MgFont *font, Color color, enum trackVisibility vis); /* Draw a single item. This is optional, but if it's here * then you can plug in genericDrawItems into the drawItems, * which takes care of all sorts of things including packing. */ int (*itemStart)(struct track *tg, void *item); /* Return start of item in base pairs. */