/*
 * $Id: draw_ssd1306.h 454 2019-06-15 22:26:42Z true $
 * begin 20190525 true
 */

#ifndef INC_DISP_DRAW_SSD1306_H_
#define INC_DISP_DRAW_SSD1306_H_



#include "driver/oled_ssd1306.h"
#include "disp/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) compact;

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) compact;

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 code *font, const char *str, uint8_t len, int8_t extra_spacing);
uint8_t ssd1306fb_get_font_height(const uint8_t code *font);

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



#endif /* INC_DISP_DRAW_SSD1306_H_ */
