src/inc/vGfx.h 1.16

1.16 2010/06/05 19:29:52 braney
add support for 32-bit color (make USE_PNG have global consequence)
Index: src/inc/vGfx.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/vGfx.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -B -U 4 -r1.15 -r1.16
--- src/inc/vGfx.h	19 Aug 2009 22:28:36 -0000	1.15
+++ src/inc/vGfx.h	5 Jun 2010 19:29:52 -0000	1.16
@@ -54,15 +54,18 @@
 
     struct rgbColor (*colorIxToRgb)(void *v, int colorIx);
     /* Return rgb values for given color index. */
 
+    void (*setWriteMode)(void *v, unsigned int writeMode);
+    /* Set write mode. */
+
     void (*setClip)(void *v, int x, int y, int width, int height);
     /* Set clipping rectangle. */
 
     void (*unclip)(void *v);
     /* Set clipping rect cover full thing. */
 
-    void (*verticalSmear)(void *v,
+    void (*verticalSmear8)(void *v,
 	    int xOff, int yOff, int width, int height, 
 	    unsigned char *dots, boolean zeroClear);
     /* Put a series of one 'pixel' width vertical lines. */
 
@@ -89,19 +92,21 @@
     int (*getFontStringWidth)(void *v, void *font, char *string);
     /* How wide is a string? */
     };
 
+#ifndef USE_PNG
 struct vGfx *vgOpenGif(int width, int height, char *fileName, boolean useTransparency);
 /* Open up something that will write out a GIF file upon vgClose.
  * If useTransparency, then the first color in memgfx's colormap/palette is
  * assumed to be the image background color, and pixels of that color
  * are made transparent. */
-
+#else
 struct vGfx *vgOpenPng(int width, int height, char *fileName, boolean useTransparency);
 /* Open up something that will write out a PNG file upon vgClose.  
  * If useTransparency, then the first color in memgfx's colormap/palette is
  * assumed to be the image background color, and pixels of that color
  * are made transparent. */
+#endif
 
 struct vGfx *vgOpenPostScript(int width, int height, char *fileName);
 /* Open up something that will someday be a PostScript file. */
 
@@ -138,8 +143,12 @@
 
 #define vgColorIxToRgb(v,colorIx) v->colorIxToRgb(v->data, colorIx)
 /* Return rgb values for given color index. */
 
+#define vgSetWriteMode(v, writeMode)    \
+	v->setWriteMode(v->data, writeMode)
+/* Set write mode. */
+
 #define vgSetClip(v,x,y,width,height) \
 	v->setClip(v->data, x, y, width, height)
 /* Set clipping rectangle. */
 
@@ -150,10 +159,10 @@
  * vgSetClip just further restrict a previous vgSetClip call.
  * The only portable way to do this is to strictly pair up
  * the setClip/unclip calls and not to nest them. */
 
-#define vgVerticalSmear(v,x,y,w,h,dots,zeroClear) \
-	v->verticalSmear(v->data,x,y,w,h,dots,zeroClear)
+#define vgVerticalSmear8(v,x,y,w,h,dots,zeroClear) \
+	v->verticalSmear8(v->data,x,y,w,h,dots,zeroClear)
 /* Take array of dots and smear them vertically. */
 
 #define vgFillUnder(v,x1,y1,x2,y2,bottom,color) \
 	v->fillUnder(v->data,x1,y1,x2,y2,bottom,color)