b8180d9f6d41dc708a2f249ba892cbca311e7a06 jcasper Mon Feb 27 11:38:55 2023 -0800 Adding transparency support for colors refs #30569 diff --git src/hg/hgTracks/rnaPLFoldTrack.c src/hg/hgTracks/rnaPLFoldTrack.c index 505875d..94f2f29 100644 --- src/hg/hgTracks/rnaPLFoldTrack.c +++ src/hg/hgTracks/rnaPLFoldTrack.c @@ -13,34 +13,34 @@ #define RNAPLFOLD_DATA_SHADES 10 /* Declare our color gradients and the the number of colors in them */ Color plShadesPos[RNAPLFOLD_DATA_SHADES * 3]; Color plOutlineColor; Color plHighDprimeLowLod; /* blue */ double basePairSpan=0; int maxBasePairSpan=5000; boolean rnaPLFoldInv=FALSE; // default is inverted = sequence on buttom double scaleHeight=0; void plShadesInit(struct track *tg, struct hvGfx *hvg, boolean isDprime) /* Allocate the LD for positive and negative values, and error cases */ { -static struct rgbColor white = {255, 255, 255}; -static struct rgbColor red = {255, 0, 0}; -static struct rgbColor green = {0 , 255, 0}; -static struct rgbColor blue = { 0, 0, 255}; +static struct rgbColor white = {255, 255, 255, 255}; +static struct rgbColor red = {255, 0, 0, 255}; +static struct rgbColor green = {0 , 255, 0, 255}; +static struct rgbColor blue = { 0, 0, 255, 255}; plOutlineColor = hvGfxFindColorIx(hvg, 0, 0, 0); /* black */ plHighDprimeLowLod = hvGfxFindColorIx(hvg, 192, 192, 240); /* blue */ hvGfxMakeColorGradient(hvg, &white, &blue, RNAPLFOLD_DATA_SHADES, plShadesPos); hvGfxMakeColorGradient(hvg, &white, &red, RNAPLFOLD_DATA_SHADES, plShadesPos + RNAPLFOLD_DATA_SHADES); hvGfxMakeColorGradient(hvg, &white, &green, RNAPLFOLD_DATA_SHADES, plShadesPos + 2 * RNAPLFOLD_DATA_SHADES); char *cartString = cartCgiUsualString(cart, RNAPLFOLD_INVERT, RNAPLFOLD_INVERT_DEF); rnaPLFoldInv = sameString(cartString,RNAPLFOLD_INVERT_BUTTOM) ? FALSE : TRUE; } void plInitColorLookup(struct track *tg, struct hvGfx *hvg, boolean isDprime) {