/*
 * $Id: draw_ssd1306.h 494 2021-07-21 11:46:11Z true $
 * begin 20190525 true
 */

#ifndef USER_RENDER_DRAW_SSD1306_H_
#define USER_RENDER_DRAW_SSD1306_H_



#include "hw/ssd1306.h"

#include "render/font.h"



void ssd1306fb_set_target(SSD1306 *target);

void ssd1306fb_set_cursor(int8_t x, int8_t y);
void ssd1306fb_set_color(uint8_t color);

void ssd1306fb_rotate(SSD1306 *src, SSD1306 *dst, int8_t rot);
void ssd1306fb_copy(int8_t x, int8_t y, uint8_t width, uint8_t height, const uint8_t *dat);

void ssd1306fb_draw_raw(int8_t x, int8_t y, uint8_t width, uint8_t height, const uint8_t *dat, uint16_t dat_offset, uint16_t bytes);

void ssd1306fb_draw_pix(uint8_t x, uint8_t y);

void ssd1306fb_draw_hline(uint8_t x1, uint8_t x2, uint8_t y);
void ssd1306fb_draw_vline(uint8_t x, uint8_t y1, uint8_t y2);
void ssd1306fb_draw_line(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2);
void ssd1306fb_draw_rect(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2);
//void ssd1306fb_draw_rect_fill(uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2);
void ssd1306fb_draw_circle(int8_t x, int8_t y, uint8_t radius);

uint8_t ssd1306fb_get_str_width(const uint8_t *font, const char *str, uint8_t len, int8_t extra_spacing);
uint8_t ssd1306fb_get_font_height(const uint8_t *font);

void ssd1306fb_draw_str(const uint8_t *font, const char *str, int8_t extra_spacing);



#endif /* USER_RENDER_DRAW_SSD1306_H_ */
