src/inc/memgfx.h 1.26

1.26 2009/08/19 22:28:36 angie
Added option to mgSaveToGif and its call stack, to use GIF's Graphic Control Extension to make memgfx's background color (0) transparent. Also corrected terminology for PNG in .h files: useAlpha -> useTransparency.
Index: src/inc/memgfx.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/inc/memgfx.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -b -B -U 4 -r1.25 -r1.26
--- src/inc/memgfx.h	5 Aug 2009 23:34:31 -0000	1.25
+++ src/inc/memgfx.h	19 Aug 2009 22:28:36 -0000	1.26
@@ -136,13 +136,19 @@
 
 void mgLineH(struct memGfx *mg, int y, int x1, int x2, Color color);
 /* Draw horizizontal line width pixels long starting at x/y in color */
 
-void mgSaveGif(struct memGfx *mg, char *name);
-/* Save memory bitmap as a gif. */
+void mgSaveGif(struct memGfx *mg, char *name, boolean useTransparency);
+/* Save memory bitmap as a gif.
+ * 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. */
 
-boolean mgSaveToGif(FILE *gif_file, struct memGfx *screen);
-/* Save GIF to an already open file. */
+boolean mgSaveToGif(FILE *gif_file, struct memGfx *screen, boolean useTransparency);
+/* Save GIF to an already open file.
+ * 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. */
 
 struct memGfx *mgLoadGif(char *name);
 /* Create memory image based on gif file. 
  * Note this is based on a very old gif reader
@@ -150,17 +156,17 @@
  * This is the same that mgSaveGif creates at
  * least.  This version of gif was always
  * color mapped. */
 
-void mgSavePng(struct memGfx *mg, char *filename, boolean useAlpha);
+void mgSavePng(struct memGfx *mg, char *filename, boolean useTransparency);
 /* Save memory bitmap to filename as a PNG.
- * If useAlpha, then the first color in memgfx's colormap/palette is
+ * 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. */
 
-boolean mgSaveToPng(FILE *png_file, struct memGfx *mg, boolean useAlpha);
+boolean mgSaveToPng(FILE *png_file, struct memGfx *mg, boolean useTransparency);
 /* Save PNG to an already open file.
- * If useAlpha, then the first color in memgfx's colormap/palette is
+ * 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. */
 
 typedef void (*TextBlit)(int bitWidth, int bitHeight, int bitX, int bitY,