43f042236ce180b8e0712d43c8baabc4ad8df1cd max Sat Jul 25 18:21:54 2026 -0700 hgTracks: add compactPack mode and codon strand-direction arrows When zoomed to codon-coloring level, draw strand-direction chevrons across the exons (white over coding codons when too small to label, contrasting color over UTRs), and a per-codon arrow between amino-acid letters via drawScaledBoxWithText. Add a compactPack trackDb setting for shorter pack/squish rows and a small squish-mode codon font. Adds mgFontForCellHeight() to memgfx and enables compactPack on the JASPAR track. diff --git src/inc/memgfx.h src/inc/memgfx.h index a33b6c9a52d..2b96fc30738 100644 --- src/inc/memgfx.h +++ src/inc/memgfx.h @@ -319,30 +319,36 @@ char *mgFontSizeBackwardsCompatible(char *size); /* Given "size" argument that may be in old tiny/small/medium/big/huge format, * return it in new numerical string format. Do NOT free the return string*/ MgFont *mgFontForSizeAndStyle(char *textSize, char *fontType); /* Get a font of given size and style. Abort with error message if not found. * The textSize should be 6,8,10,12,14,18,24 or 34. For backwards compatibility * textSizes of "tiny" "small", "medium", "large" and "huge" are also ok. * The fontType should be "medium", "bold", or "fixed" */ MgFont *mgFontForSize(char *textSize); /* Get a font of given size and style. Abort with error message if not found. * The textSize should be 6,8,10,12,14,18,24 or 34. For backwards compatibility * textSizes of "tiny" "small", "medium", "large" and "huge" are also ok. */ +MgFont *mgFontForCellHeight(int cellHeight); +/* Return a font whose reported cell height is cellHeight, for FreeType rendering + * at an in-between size no fixed built-in font offers (cellHeight 10 -> ~9px). + * VALID ONLY UNDER FREETYPE; callers must fall back to a fixed-size font when + * FreeType is off (the GEM engine would misread the glyph bitmaps). */ + void mgFillUnder(struct memGfx *mg, int x1, int y1, int x2, int y2, int bottom, Color color); /* Draw a 4 sided filled figure that has line x1/y1 to x2/y2 at * it's top, a horizontal line at bottom at it's bottom, and * vertical lines from the bottom to y1 on the left and bottom to * y2 on the right. */ struct memGfx *mgRotate90(struct memGfx *in); /* Create a copy of input that is rotated 90 degrees clockwise. */ void mgCircle(struct memGfx *mg, int xCen, int yCen, int rad, Color color, boolean filled); /* Draw a circle using a stepping algorithm. Doesn't correct * for non-square pixels. */