src/hg/hgTracks/chromGraphTrack.c 1.15
1.15 2009/06/26 20:12:15 tdreszer
Inital checkin of imageV2, but ifdef'd out.
Index: src/hg/hgTracks/chromGraphTrack.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/chromGraphTrack.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -b -B -U 4 -r1.14 -r1.15
--- src/hg/hgTracks/chromGraphTrack.c 3 Sep 2008 19:19:01 -0000 1.14
+++ src/hg/hgTracks/chromGraphTrack.c 26 Jun 2009 20:12:15 -0000 1.15
@@ -9,8 +9,9 @@
#include "hdb.h"
#include "hgTracks.h"
#include "hvGfx.h"
#include "chromGraph.h"
+#include "imageV2.h"
Color colorFromAscii(struct hvGfx *hvg, char *asciiColor)
/* Get color index for a named color. */
/* Copy/pasted from hgGenome/mainPage.c ... should be in a library */
@@ -178,13 +179,24 @@
/* Do map box */
xOff = hvGfxAdjXW(hvg, xOff, width);
char *encodedTrack = cgiEncode(tg->mapName);
+#ifdef IMAGEv2_UI
+if(curMap != NULL)
+ {
+ char link[512];
+ safef(link,sizeof(link),"%s&o=%d&t=%d&g=%s&c=%s&l=%d&r=%d&db=%s&pix=%d", hgcNameAndSettings(),
+ winStart, winEnd, encodedTrack, chromName, winStart, winEnd, database, tl.picWidth);
+ // Add map item to currnent map (TODO: pass in map)
+ mapSetItemAdd(curMap,link,NULL,xOff,yOff,xOff+width,yOff+height);
+ }
+#else//ifndef IMAGEv2_UI
hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", xOff, yOff, xOff+width,
yOff+height);
hPrintf("HREF=\"%s&o=%d&t=%d&g=%s&c=%s&l=%d&r=%d&db=%s&pix=%d\">\n",
hgcNameAndSettings(), winStart, winEnd, encodedTrack, chromName, winStart, winEnd,
database, tl.picWidth);
+#endif//ndef IMAGEv2_UI
}
static void cgDrawItems(struct track *tg, int seqStart, int seqEnd,
struct hvGfx *hvg, int xOff, int yOff, int width,