diff options
Diffstat (limited to 'keyboards/lily58/keymaps/druotoni/draw_helper.h')
| -rw-r--r-- | keyboards/lily58/keymaps/druotoni/draw_helper.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/keyboards/lily58/keymaps/druotoni/draw_helper.h b/keyboards/lily58/keymaps/druotoni/draw_helper.h new file mode 100644 index 000000000..991ab0d0a --- /dev/null +++ b/keyboards/lily58/keymaps/druotoni/draw_helper.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | // Copyright 2021 Nicolas Druoton (druotoni) | ||
| 2 | // Copyright 2021 ugfx | ||
| 3 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | // line | ||
| 8 | void drawline_vb(uint8_t x, uint8_t y, uint8_t width, bool color); | ||
| 9 | void drawline_vt(uint8_t x, uint8_t y, uint8_t width, bool color); | ||
| 10 | void drawline_hr(uint8_t x, uint8_t y, uint8_t width, bool color); | ||
| 11 | void drawline_hl(uint8_t x, uint8_t y, uint8_t width, bool color); | ||
| 12 | void drawline_hr_heigth(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, bool color); | ||
| 13 | |||
| 14 | // rectangle | ||
| 15 | void draw_rectangle(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, bool color); | ||
| 16 | void draw_rectangle_fill(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, bool color); | ||
| 17 | void draw_gradient(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, uint8_t color_start, uint8_t color_end, uint8_t tres); | ||
| 18 | |||
| 19 | // circle | ||
| 20 | void draw_fill_circle(short x, short y, uint8_t radius, bool color); | ||
| 21 | void draw_circle(uint8_t x, uint8_t y, uint8_t radius, bool color); | ||
| 22 | void draw_ellipse(uint8_t x, uint8_t y, uint8_t a, uint8_t b, bool color); | ||
| 23 | void draw_ellipse_fill(uint8_t x, uint8_t y, uint8_t a, uint8_t b, bool color); | ||
| 24 | void draw_arc_sector(uint8_t x, uint8_t y, uint8_t radius, unsigned char sectors, unsigned char half, bool color); | ||
| 25 | void draw_static(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, int color, uint8_t density); | ||
| 26 | |||
| 27 | // text | ||
| 28 | void draw_random_char(uint8_t column, uint8_t row, char final_char, int value, uint8_t style); | ||
| 29 | void draw_label(const char *data, uint8_t len, uint8_t row, int value); | ||
| 30 | void draw_box(const char *data, uint8_t len, uint8_t row, long value, uint8_t style); | ||
| 31 | void draw_progress(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, int value, uint8_t style, bool color); | ||
| 32 | |||
| 33 | // oled drivers stuff | ||
| 34 | char get_oled_char(uint16_t start_index); | ||
| 35 | void oled_write_cursor(uint8_t col, uint8_t line, const char *data, bool invert); | ||
| 36 | void oled_write_raw_P_cursor(uint8_t col, uint8_t line, const char *data, uint16_t size); | ||
| 37 | |||
| 38 | // pixel manipulation | ||
| 39 | void copy_pixel(int from, int shift, unsigned char mask); | ||
| 40 | void move_block(uint8_t x, uint8_t y, uint8_t width, uint8_t heigth, int shift); | ||
| 41 | void draw_glitch_comb(uint8_t x, uint8_t y, uint8_t width, uint16_t height, uint8_t iSize, bool odd); | ||
| 42 | |||
| 43 | // misc | ||
| 44 | void render_tv_animation(uint8_t frame_number, uint8_t x, uint8_t y, uint8_t width, uint8_t heigth); | ||
| 45 | int interpo_pourcent(int min, int max, int v); | ||
| 46 | void get_glitch_index(uint32_t *glitch_timer, int *current_glitch_scope_time, uint8_t *glitch_index, uint8_t min_time, uint16_t max_time, uint8_t glitch_probobility, uint8_t glitch_frame_number); | ||
| 47 | void get_glitch_index_new(uint16_t *glitch_timer, uint8_t *current_glitch_scope_time, uint8_t *glitch_index, uint8_t min_time, uint16_t max_time, uint8_t glitch_probobility, uint8_t glitch_frame_number); | ||
