5c16e9df442a6a66c91f8cbf52f7543cb9cb4517
braney
  Mon Dec 6 16:34:22 2021 -0800
add new function to the graphics library to put text in a box that is
used by the logo function of wiggle draws

diff --git src/hg/inc/hvGfx.h src/hg/inc/hvGfx.h
index 4d390c7..0dd5d60 100644
--- src/hg/inc/hvGfx.h
+++ src/hg/inc/hvGfx.h
@@ -141,30 +141,37 @@
                       int colorIx, void *font, char *text)
 /* Draw a line of text with upper right corner x,y. */
 {
 if (hvg->rc)
     {
     // move x,y to upper right corner
     int fHeight = vgGetFontPixelHeight(hvg->vg, font);
     // this is what mgTextRight does,  not sure why
     y += (height - fHeight)/2 + ((font == mgSmallFont()) ?  1 : 0);
     vgText(hvg->vg, hvGfxAdjXW(hvg, x, width), y, colorIx, font, text);
     }
 else
     vgTextRight(hvg->vg, x, y, width, height, colorIx, font, text);
 }
 
+INLINE void hvGfxTextInBox(struct hvGfx *hvg, int x, int y, int width, int height,
+                           int colorIx, void *font, char *text)
+/* Draw a line of text to fill box. */
+{
+vgTextInBox(hvg->vg, hvGfxAdjXW(hvg, x, width), y, width, height, colorIx, font, text);
+}
+
 INLINE void hvGfxTextCentered(struct hvGfx *hvg, int x, int y, int width, int height,
                            int colorIx, void *font, char *text)
 /* Draw a line of text in middle of box. */
 {
 vgTextCentered(hvg->vg, hvGfxAdjXW(hvg, x, width), y, width, height, colorIx, font, text);
 }
 
 INLINE void hvGfxSetWriteMode(struct hvGfx *hvg, int writeMode)
 /* set write mode */
 {
 vgSetWriteMode(hvg->vg, writeMode);
 }
 
 INLINE void hvGfxSetClip(struct hvGfx *hvg, int x, int y, int width, int height)
 /* Set clipping rectangle. */