void hCytoBandDrawAt(struct cytoBand *band, struct hvGfx *hvg,
	int x, int y, int width, int height, boolean isDmel,
	MgFont *font, int fontPixelHeight, Color aColor, Color bColor,
	Color *shades, int maxShade)
/* Draw a single band in appropriate color at given position.  If there's
 * room put in band label. */
{
Color col = hCytoBandColor(band, hvg, isDmel, aColor, bColor, shades, maxShade);
hvGfxBox(hvg, x, y, width, height, col);
if (height >= mgFontLineHeight(font))
    {
    char *s = abbreviatedBandName(band, font, width, isDmel);
    if (s != NULL)
	{
	Color textCol = hvGfxContrastingColor(hvg, col);
	hvGfxTextCentered(hvg, x, y, width, height, textCol, font, s);
	}
    }
}
Пример #2
0
static Color cytoBandItemColor(struct track *tg, void *item, struct hvGfx *hvg)
/* Figure out color of band. */
{
return hCytoBandColor(item, hvg, hCytoBandDbIsDmel(database),
	tg->ixColor, tg->ixAltColor, shadesOfGray, maxShade);
}