8b010980b84c625d264f46c77e74a79f96a5fe87 braney Sun Oct 11 13:36:42 2020 -0700 make the background of freetype fonts be transparent diff --git src/inc/memgfx.h src/inc/memgfx.h index f70a1f4..a36a7e2 100644 --- src/inc/memgfx.h +++ src/inc/memgfx.h @@ -400,28 +400,29 @@ * saturation scale 's', and * value scale 'v' * Returns the transformed rgb value * Use H=0, S=V=1 for identity transformation */ struct rgbColor mgColorIxToRgb(struct memGfx *mg, int colorIx); /* Return rgb value at color index. */ struct rgbColor colorIxToRgb(int colorIx); /* Return rgb value at color index. */ INLINE void mixDot(struct memGfx *img, int x, int y, float frac, Color col) /* Puts a single dot on the image, mixing it with what is already there * based on the frac argument. */ +/* Shouldn't this pay attention to the transparency of the current pixel? */ { if ((x < img->clipMinX) || (x >= img->clipMaxX) || (y < img->clipMinY) || (y >= img->clipMaxY)) return; Color *pt = _mgPixAdr(img,x,y); float invFrac = 1 - frac; int r = COLOR_32_RED(*pt) * invFrac + COLOR_32_RED(col) * frac; int g = COLOR_32_GREEN(*pt) * invFrac + COLOR_32_GREEN(col) * frac; int b = COLOR_32_BLUE(*pt) * invFrac + COLOR_32_BLUE(col) * frac; mgPutDot(img,x,y,MAKECOLOR_32(r,g,b)); } #endif /* MEMGFX_H */