d3752edc12da1bf08427946150f564dbdd5d2254
angie
  Thu Oct 24 13:55:51 2019 -0700
bigDbSnp track handler code - initial commit.  refs #23283
* dnautil: Added trimRefAltLeft to get left-justified trimming (a la VCF not HGVS).
* bigBedClick: do hReplaceGbdb up front in parseDetailsTablUrls instead of waiting until endpoint.
* trackDbCustom.c: consolidating type-handling for wig/bigWig vs. bigBed-based big*.

diff --git src/hg/hgTracks/hgTracks.h src/hg/hgTracks/hgTracks.h
index a795765..5a743eb 100644
--- src/hg/hgTracks/hgTracks.h
+++ src/hg/hgTracks/hgTracks.h
@@ -665,30 +665,36 @@
 void mapStatusMessage(char *format, ...)
 /* Write out stuff that will cause a status message to
  * appear when the mouse is over this box. */
 #if defined(__GNUC__)
 __attribute__((format(printf, 1, 2)))
 #endif
 ;
 
 double scaleForWindow(double width, int seqStart, int seqEnd);
 /* Return the scale for the window. */
 
 double scaleForPixels(double pixelWidth);
 /* Return what you need to multiply bases by to
  * get to scale of pixel coordinates. */
 
+boolean scaledBoxToPixelCoords(int chromStart, int chromEnd, double scale, int xOff,
+                               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. */
 
 Color whiteIndex();
 /* Return index of white. */
 
 Color blackIndex();
 /* Return index of black. */