-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcomposite.h
53 lines (45 loc) · 1.03 KB
/
composite.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* composite.h -- Porter-Duff image compositing */
#ifndef COMPOSITE_H
#define COMPOSITE_H
#ifdef __cplusplus
extern "C"
{
#endif
#include "base/result.h"
#include "framebuf/bitmap.h"
#include "framebuf/pixelfmt.h"
typedef enum composite_rule
{
composite_RULE_CLEAR,
composite_RULE_SRC,
composite_RULE_DST,
composite_RULE_SRC_OVER,
composite_RULE_DST_OVER,
composite_RULE_SRC_IN,
composite_RULE_DST_IN,
composite_RULE_SRC_OUT,
composite_RULE_DST_OUT,
composite_RULE_SRC_ATOP,
composite_RULE_DST_ATOP,
composite_RULE_XOR,
composite_RULE__LIMIT
}
composite_rule_t;
/**
* Composites bitmap 'src' over 'dst' (or other rule).
*
* \param[in] rule Compositing rule to use.
* \param[in] src First source bitmap.
* \param[in] dst Second source and destination bitmap.
*
* \return Result.
*
* The given bitmaps must have alpha channels.
*/
result_t composite(composite_rule_t rule,
const bitmap_t *src,
bitmap_t *dst);
#ifdef __cplusplus
}
#endif
#endif /* COMPOSITE_H */