forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.h
More file actions
64 lines (53 loc) · 1.7 KB
/
__init__.h
File metadata and controls
64 lines (53 loc) · 1.7 KB
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
54
55
56
57
58
59
60
61
62
63
64
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2024 Jeff Epler for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#pragma once
#include "shared-module/displayio/Bitmap.h"
void shared_module_bitmapfilter_morph(
displayio_bitmap_t *bitmap,
displayio_bitmap_t *mask,
const int ksize,
const int *krn,
const mp_float_t m,
const mp_float_t b,
bool threshold,
int offset,
bool invert);
void shared_module_bitmapfilter_morph9(
displayio_bitmap_t *bitmap,
displayio_bitmap_t *mask,
const int ksize,
int krn[9 * (2 * ksize + 1) * (2 * ksize + 1)], // Note: modifies krn[]
const mp_float_t m[3],
const mp_float_t b[3],
bool threshold,
int offset,
bool invert);
void shared_module_bitmapfilter_mix(
displayio_bitmap_t *bitmap,
displayio_bitmap_t *mask,
const mp_float_t weights[12]);
void shared_module_bitmapfilter_solarize(
displayio_bitmap_t *bitmap,
displayio_bitmap_t *mask,
const mp_float_t threshold);
typedef struct {
uint8_t r[32], g[64], b[32];
} bitmapfilter_lookup_table_t;
void shared_module_bitmapfilter_lookup(
displayio_bitmap_t *bitmap,
displayio_bitmap_t *mask,
const bitmapfilter_lookup_table_t *table);
void shared_module_bitmapfilter_false_color(
displayio_bitmap_t *bitmap,
displayio_bitmap_t *mask,
_displayio_color_t palette[256]);
void shared_module_bitmapfilter_blend_precompute(mp_obj_t fun, uint8_t lookup[4096]);
void shared_module_bitmapfilter_blend(
displayio_bitmap_t *dest,
displayio_bitmap_t *src1,
displayio_bitmap_t *src2,
displayio_bitmap_t *mask,
const uint8_t lookup[4096]);