a74f126b857e357682dce4a06453b26133e44bc5
hiram
Thu Oct 15 14:43:57 2015 -0700
removed too much fixup gcc warnings for -Wunused-but-set-variable refs #16121
diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index c820fbe..e3a40b5 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -2074,34 +2074,43 @@
int basePositionHeight = rulerHeight;
int codonHeight = fontHeight;
int rulerTranslationHeight = codonHeight * 3; // 3 frames
int yAfterRuler = gfxBorder;
int yAfterBases = yAfterRuler; // differs if base-level translation shown
boolean rulerCds = zoomedToCdsColorLevel;
int rulerClickHeight = 0;
int newWinWidth = 0;
/* Figure out dimensions and allocate drawing space. */
pixWidth = tl.picWidth;
leftLabelX = gfxBorder;
leftLabelWidth = insideX - gfxBorder*3;
+struct image *theOneImg = NULL; // No need to be global, only the map needs to be global
+struct image *theSideImg = NULL; // Because dragScroll drags off end of image,
+ // the side label gets seen. Therefore we need 2 images!!
+//struct imgTrack *curImgTrack = NULL; // Make this global for now to avoid huge rewrite
+struct imgSlice *curSlice = NULL; // No need to be global, only the map needs to be global
+struct mapSet *curMap = NULL; // Make this global for now to avoid huge rewrite
+
// Set up imgBox dimensions
int sliceWidth[stMaxSliceTypes]; // Just being explicit
int sliceOffsetX[stMaxSliceTypes];
int sliceHeight = 0;
+int sliceOffsetY = 0;
+char *rulerTtl = NULL;
if (theImgBox)
// theImgBox is a global for now to avoid huge rewrite of hgTracks. It is started
// prior to this in doTrackForm()
{
hPrintf("\n", database);
hPrintf("\n", chromName);
hPrintf("\n", winStart);
hPrintf("\n", winEnd);
hPrintf("\n", tl.picWidth);
// If a portal was established, then set the global dimensions to the entire image size
if (imgBoxPortalDimensions(theImgBox,&winStart,&winEnd,&(tl.picWidth),NULL,NULL,NULL,NULL,NULL))
{
pixWidth = tl.picWidth;
winBaseCount = winEnd - winStart;
insideWidth = tl.picWidth-gfxBorder-insideX;
@@ -2240,41 +2249,49 @@
{
hvg = hvGfxOpenPostScript(pixWidth, pixHeight, psOutput);
hvgSide = hvg; // Always only one image
}
else
{
boolean transparentImage = FALSE;
if (theImgBox!=NULL)
transparentImage = TRUE; // transparent because BG (blue ruler lines) is separate image
if (measureTiming)
measureTime("Time at start of obtaining trash hgt png image file");
trashDirFile(&pngTn, "hgt", "hgt", ".png");
hvg = hvGfxOpenPng(pixWidth, pixHeight, pngTn.forCgi, transparentImage);
+ if (theImgBox)
+ {
+ // Adds one single image for all tracks (COULD: build the track by track images)
+ theOneImg = imgBoxImageAdd(theImgBox,pngTn.forHtml,NULL,pixWidth, pixHeight,FALSE);
+ theSideImg = theOneImg; // Unlkess this is overwritten below, there is a single image
+ }
+
hvgSide = hvg; // Unlkess this is overwritten below, there is a single image
if (theImgBox && theImgBox->showPortal && withLeftLabels)
{
// TODO: It would be great to make the two images smaller,
// but keeping both the same full size for now
struct tempName pngTnSide;
trashDirFile(&pngTnSide, "hgtSide", "side", ".png");
hvgSide = hvGfxOpenPng(pixWidth, pixHeight, pngTnSide.forCgi, transparentImage);
// Also add the side image
+ theSideImg = imgBoxImageAdd(theImgBox,pngTnSide.forHtml,NULL,pixWidth, pixHeight,FALSE);
hvgSide->rc = revCmplDisp;
initColors(hvgSide);
}
}
hvg->rc = revCmplDisp;
initColors(hvg);
/* Start up client side map. */
hPrintf("\n");
// turn off inPlaceUpdate when rows in imgTbl can arbitrarily reappear and disappear (see redmine #7306 and #6944)
jsonObjectAdd(jsonForClient, "inPlaceUpdate", newJsonBoolean(withLeftLabels && withCenterLabels));
jsonObjectAdd(jsonForClient, "rulerClickHeight", newJsonNumber(rulerClickHeight));
if(newWinWidth)
{