6eab7fc47402f1ce34ed331ae80f5bcbee54da82 braney Thu Dec 16 13:30:33 2010 -0800 remove USE_PNG and GIF support #1323 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index f0d62b4..9a015f4 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -617,37 +617,32 @@ char title[32]; startBand[0] = endBand[0] = '\0'; fillInStartEndBands(ideoTrack, startBand, endBand, sizeof(startBand)); /* Start up client side map. */ if (!psOutput) hPrintf("\n", mapName); /* Draw the ideogram. */ ideoHeight = gfxBorder + ideoTrack->height; if (psOutput) { trashDirFile(ideoTn, "hgtIdeo", "hgtIdeo", ".ps"); hvg = hvGfxOpenPostScript(ideoWidth, ideoHeight, ideoTn->forCgi); } else { -#ifdef USE_PNG trashDirFile(ideoTn, "hgtIdeo", "hgtIdeo", ".png"); hvg = hvGfxOpenPng(ideoWidth, ideoHeight, ideoTn->forCgi, FALSE); -#else - trashDirFile(ideoTn, "hgtIdeo", "hgtIdeo", ".gif"); - hvg = hvGfxOpenGif(ideoWidth, ideoHeight, ideoTn->forCgi, FALSE); -#endif } hvg->rc = revCmplDisp; initColors(hvg); ideoTrack->ixColor = hvGfxFindRgb(hvg, &ideoTrack->color); ideoTrack->ixAltColor = hvGfxFindRgb(hvg, &ideoTrack->altColor); hvGfxSetClip(hvg, 0, gfxBorder, ideoWidth, ideoTrack->height); if(sameString(startBand, endBand)) safef(title, sizeof(title), "%s (%s)", chromName, startBand); else safef(title, sizeof(title), "%s (%s-%s)", chromName, startBand, endBand); textWidth = mgFontStringWidth(font, title); hvGfxTextCentered(hvg, 2, gfxBorder, textWidth, ideoTrack->height, MG_BLACK, font, title); ideoTrack->drawItems(ideoTrack, winStart, winEnd, hvg, textWidth+4, gfxBorder, ideoWidth-textWidth-4, font, ideoTrack->ixColor, ideoTrack->limitedVis); hvGfxUnclip(hvg); @@ -2044,57 +2039,47 @@ } } imagePixelHeight = pixHeight; if (psOutput) { 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 -#ifdef USE_PNG trashDirFile(&gifTn, "hgt", "hgt", ".png"); hvg = hvGfxOpenPng(pixWidth, pixHeight, gifTn.forCgi, transparentImage); -#else //ifndef - trashDirFile(&gifTn, "hgt", "hgt", ".gif"); - hvg = hvGfxOpenGif(pixWidth, pixHeight, gifTn.forCgi, transparentImage); -#endif //ndef USE_PNG if(theImgBox) { // Adds one single image for all tracks (COULD: build the track by track images) theOneImg = imgBoxImageAdd(theImgBox,gifTn.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 images smaller, but keeping both the same full size for now struct tempName gifTnSide; - #ifdef USE_PNG trashDirFile(&gifTnSide, "hgt", "side", ".png"); hvgSide = hvGfxOpenPng(pixWidth, pixHeight, gifTnSide.forCgi, transparentImage); - #else //ifndef - trashDirFile(&gifTnSide, "hgt", "side", ".gif"); - hvgSide = hvGfxOpenGif(pixWidth, pixHeight, gifTnSide.forCgi, transparentImage); - #endif //ndef USE_PNG // Also add the side image theSideImg = imgBoxImageAdd(theImgBox,gifTnSide.forHtml,NULL,pixWidth, pixHeight,FALSE); hvgSide->rc = revCmplDisp; initColors(hvgSide); } } hvg->rc = revCmplDisp; initColors(hvg); /* Start up client side map. */ hPrintf("\n", mapName); /* Find colors to draw in. */ findTrackColors(hvg, trackList); @@ -2292,45 +2277,37 @@ else { leftLabelX = leftLabelWidth = 0; } /* Draw guidelines. */ if (withGuidelines) { struct hvGfx *bgImg = hvg; // Default to the one image boolean exists = FALSE; if(theImgBox) { struct tempName gifBg; char base[64]; safef(base,sizeof(base),"blueLines%d-%s%d-%d",pixWidth,(revCmplDisp?"r":""),insideX,guidelineSpacing); // reusable file needs width, leftLabel start and guidelines - #ifdef USE_PNG exists = trashDirReusableFile(&gifBg, "hgt", base, ".png"); - #else///ifndef - exists = trashDirReusableFile(&gifBg, "hgt", base, ".gif"); - #endif///ndef USE_PNG if (exists && cgiVarExists("hgt.reset")) // exists means don't remake bg image. exists = TRUE; // However, for the time being, rebuild when user presses "default tracks" if (!exists) { - #ifdef USE_PNG bgImg = hvGfxOpenPng(pixWidth, pixHeight, gifBg.forCgi, TRUE); - #else///ifndef - bgImg = hvGfxOpenGif(pixWidth, pixHeight, gifBg.forCgi, TRUE); - #endif///ndef USE_PNG bgImg->rc = revCmplDisp; } imgBoxImageAdd(theImgBox,gifBg.forHtml,NULL,pixWidth, pixHeight,TRUE); // Adds BG image } if (!exists) { int x; Color lightBlue = hvGfxFindRgb(bgImg, &guidelineColor); hvGfxSetClip(bgImg, insideX, 0, insideWidth, pixHeight); y = gfxBorder; for (x = insideX+guidelineSpacing-1; x