Files
kichikuou 2ed44dab6d Move surface and graphic functions from modules/lib to modules/Gpx
Except for gr_blend_alpha_map(), which is used by oujimisc.
2025-02-19 14:57:40 +09:00

23 lines
392 B
C

// alpha map の矩形塗りつぶし
#include <string.h>
#include "portab.h"
#include "surface.h"
#include "ngraph.h"
#include "ags.h"
void gr_fill_alpha_map(surface_t *dst, int dx, int dy, int dw, int dh, int lv) {
uint8_t *a;
if (!gr_clip_xywh(dst, &dx, &dy, &dw, &dh)) {
return;
}
a = GETOFFSET_ALPHA(dst, dx, dy);
while(dh--){
memset(a, lv, dw);
a += dst->width;
}
}