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.
24 int16_t stride; /* in units */
25 int16_t width; /* in pixels */
26 int16_t height; /* in pixels */
37 struct ao_glyph_metrics {
48 const struct ao_glyph_metrics *metrics;
55 ao_copy(const struct ao_bitmap *dst,
60 const struct ao_bitmap *src,
66 ao_rect(const struct ao_bitmap *dst,
75 ao_pattern(const struct ao_bitmap *dst,
80 const struct ao_pattern *pattern,
86 ao_line(const struct ao_bitmap *dst,
95 ao_poly(const struct ao_bitmap *dst,
96 const struct ao_coord *coords,
102 ao_text(const struct ao_bitmap *dst,
103 const struct ao_font *font,
110 extern const struct ao_font FrutigerLT_Roman_50_font;
113 #define AO_UNIT (1 << AO_SHIFT)
114 #define AO_MASK (AO_UNIT - 1)
115 #define AO_ALLONES ((uint32_t) -1)
128 #define AO_CLEAR 0x0 /* 0 */
129 #define AO_AND 0x1 /* src AND dst */
130 #define AO_AND_REVERSE 0x2 /* src AND NOT dst */
131 #define AO_COPY 0x3 /* src */
132 #define AO_AND_INVERTED 0x4 /* NOT src AND dst */
133 #define AO_NOOP 0x5 /* dst */
134 #define AO_XOR 0x6 /* src XOR dst */
135 #define AO_OR 0x7 /* src OR dst */
136 #define AO_NOR 0x8 /* NOT src AND NOT dst */
137 #define AO_EQUIV 0x9 /* NOT src XOR dst */
138 #define AO_INVERT 0xa /* NOT dst */
139 #define AO_OR_REVERSE 0xb /* src OR NOT dst */
140 #define AO_COPY_INVERTED 0xc /* NOT src */
141 #define AO_OR_INVERTED 0xd /* NOT src OR dst */
142 #define AO_NAND 0xe /* NOT src OR NOT dst */
143 #define AO_SET 0xf /* 1 */
145 #endif /* _AO_DRAW_H_ */