2 * Copyright © 2016 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
20 int16_t stride; /* in units */
21 int16_t width; /* in pixels */
22 int16_t height; /* in pixels */
30 ao_copy(const struct ao_bitmap *dst,
35 const struct ao_bitmap *src,
41 ao_rect(const struct ao_bitmap *dst,
50 ao_pattern(const struct ao_bitmap *dst,
55 const struct ao_pattern *pattern,
61 ao_line(const struct ao_bitmap *dst,
70 ao_text(const struct ao_bitmap *dst,
84 extern const struct ao_font ao_font;
87 #define AO_UNIT (1 << AO_SHIFT)
88 #define AO_MASK (AO_UNIT - 1)
89 #define AO_ALLONES ((uint32_t) -1)
102 #define AO_CLEAR 0x0 /* 0 */
103 #define AO_AND 0x1 /* src AND dst */
104 #define AO_AND_REVERSE 0x2 /* src AND NOT dst */
105 #define AO_COPY 0x3 /* src */
106 #define AO_AND_INVERTED 0x4 /* NOT src AND dst */
107 #define AO_NOOP 0x5 /* dst */
108 #define AO_XOR 0x6 /* src XOR dst */
109 #define AO_OR 0x7 /* src OR dst */
110 #define AO_NOR 0x8 /* NOT src AND NOT dst */
111 #define AO_EQUIV 0x9 /* NOT src XOR dst */
112 #define AO_INVERT 0xa /* NOT dst */
113 #define AO_OR_REVERSE 0xb /* src OR NOT dst */
114 #define AO_COPY_INVERTED 0xc /* NOT src */
115 #define AO_OR_INVERTED 0xd /* NOT src OR dst */
116 #define AO_NAND 0xe /* NOT src OR NOT dst */
117 #define AO_SET 0xf /* 1 */
119 #endif /* _AO_DRAW_H_ */