src/hg/inc/hvGfx.h 1.6
1.6 2010/06/05 19:29:46 braney
add support for 32-bit color (make USE_PNG have global consequence)
Index: src/hg/inc/hvGfx.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/inc/hvGfx.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -b -B -U 4 -r1.5 -r1.6
--- src/hg/inc/hvGfx.h 19 Aug 2009 22:28:36 -0000 1.5
+++ src/hg/inc/hvGfx.h 5 Jun 2010 19:29:46 -0000 1.6
@@ -18,20 +18,22 @@
int clipMinY;
int clipMaxY;
};
+#ifndef USE_PNG
struct hvGfx *hvGfxOpenGif(int width, int height, char *fileName, boolean useTransparency);
/* Open up something that we'll write out as a GIF someday.
* 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 hvGfx *hvGfxOpenPng(int width, int height, char *fileName, boolean useTransparency);
/* Open up something that we'll write out as a PNG someday.
* 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 /* USE_PNG */
struct hvGfx *hvGfxOpenPostScript(int width, int height, char *fileName);
/* Open up something that will someday be a PostScript file. */
@@ -131,8 +133,14 @@
{
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. */
{
// this should not be adjusted for RC
@@ -155,14 +163,14 @@
hvg->clipMaxY = hvg->height;
vgUnclip(hvg->vg);
}
-INLINE void hvGfxVerticalSmear(struct hvGfx *hvg,
+INLINE void hvGfxVerticalSmear8(struct hvGfx *hvg,
int xOff, int yOff, int width, int height,
unsigned char *dots, boolean zeroClear)
-/* Put a series of one 'pixel' width vertical lines. */
+/* Put a series of one '8-bit pixel' width vertical lines. */
{
-vgVerticalSmear(hvg->vg, hvGfxAdjXW(hvg, xOff, width), yOff, width, height, dots, zeroClear);
+vgVerticalSmear8(hvg->vg, hvGfxAdjXW(hvg, xOff, width), yOff, width, height, dots, zeroClear);
}
INLINE void hvGfxFillUnder(struct hvGfx *hvg, int x1, int y1, int x2, int y2,
int bottom, Color color)