File: graph_fillrect_amap.c

package info (click to toggle)
xsystem35 1.7.3-pre5-7
  • links: PTS
  • area: main
  • in suites: buster
  • size: 7,332 kB
  • sloc: ansic: 51,002; sh: 12,048; asm: 863; makefile: 410; xml: 281; perl: 142
file content (24 lines) | stat: -rw-r--r-- 397 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// alpha map ζɤĤ֤

#include <string.h>
#include "portab.h"
#include "surface.h"
#include "ngraph.h"
#include "ags.h"

int gr_fill_alpha_map(surface_t *dst, int dx, int dy, int dw, int dh, int lv) {
	BYTE *a;
	
	if (!gr_clip_xywh(dst, &dx, &dy, &dw, &dh)) {
		return NG;
	}
	
	a = GETOFFSET_ALPHA(dst, dx, dy);
	
	while(dh--){
		memset(a, lv, dw);
		a += dst->width;
	}
	
	return OK;
}