d96ac78dc01133a55575481975194bfc1b8accc1
markd
  Tue Dec 12 13:11:04 2023 -0800
Make glyph drawing code from decorators to being available to all of hgTracks.  This is to allow for experimentation in using glyphs to draw SNPs.  There is no functional changes, it just moves code around.

diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index d139199..46733f8 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -741,30 +741,51 @@
                                int *pX1, int *pX2);
 /* Convert chrom coordinates to pixels. Clip to window to prevent integer overflow.
  * For special case of a SNP insert location with width==0, set width=1.
  * Returns FALSE if it does not intersect the window, or if it would have a negative width. */
 
 void drawScaledBox(struct hvGfx *hvg, int chromStart, int chromEnd,
 	double scale, int xOff, int y, int height, Color color);
 /* Draw a box scaled from chromosome to window coordinates.
  * Get scale first with scaleForPixels. */
 
 void drawScaledBoxLabel(struct hvGfx *hvg,
      int chromStart, int chromEnd, double scale,
      int xOff, int y, int height, Color color, MgFont *font,  char *label);
 /* Draw a box scaled from chromosome to window coordinates and draw a label onto it. */
 
+typedef enum {
+    GLYPH_CIRCLE,
+    GLYPH_TRIANGLE,
+    GLYPH_INV_TRIANGLE,
+    GLYPH_SQUARE,
+    GLYPH_DIAMOND,
+    GLYPH_OCTAGON,
+    GLYPH_STAR,
+    GLYPH_PENTAGRAM
+    } glyphType;
+
+void drawScalledGlyph(struct hvGfx *hvg, int chromStart, int chromEnd, double scale, int xOff, int y,
+                      int heightPer, glyphType glyph, boolean filled, Color outlineColor, Color fillColor);
+/* Draw a glyph as a circle/polygon.  If filled, draw as with fillColor,
+ * which may have transparency.
+ */
+
+glyphType parseGlyphType(char *glyphStr);
+/* Return the enum glyph type for a string specifying a glyph.
+ * Defaults to GLYPH_CIRCLE if the string is unrecognized. */
+
 Color whiteIndex();
 /* Return index of white. */
 
 Color blackIndex();
 /* Return index of black. */
 
 Color grayIndex();
 /* Return index of gray. */
 
 Color lightGrayIndex();
 /* Return index of light gray. */
 
 Color veryLightGrayIndex();
 /* Return index of very light gray. */