12#ifndef M5AVATAR_DRAWING_UTILS_HPP_
13#define M5AVATAR_DRAWING_UTILS_HPP_
15#include <BoundingRect.h>
16#include <DrawContext.h>
20void rotatePoint(
float &x,
float &y,
float angle);
22void rotatePointAround(
float &x,
float &y,
float angle,
float cx,
float cy);
24void fillRotatedRect(M5Canvas *canvas, uint16_t cx, uint16_t cy, uint16_t w,
25 uint16_t h,
float angle, uint16_t color);
27void fillRectRotatedAround(M5Canvas *canvas,
float top_left_x,
float top_left_y,
28 float bottom_right_x,
float bottom_right_y,
29 float angle, uint16_t cx, uint16_t cy,
45void computeParamsOfCirclePassingThroughThreePoints(
float &r,
float &cx,
51void computeAnglesOfArcPassingThroughThreePoints(
52 float &min_angle,
float &max_angle,
float &via_angle,
float x1,
float y1,
53 float x2,
float y2,
float via_x,
float via_y,
float cx,
float cy);
55void drawCircle(M5Canvas *canvas,
float x1,
float y1,
float x2,
float y2,
56 float x3,
float y3, uint16_t color);
72void drawArc(M5Canvas *canvas,
float x1,
float y1,
float x2,
float y2,
73 float via_x,
float via_y, uint8_t thickness = 4,
74 uint16_t color = 0xffff, uint8_t offset = 0);
76void fillArc(M5Canvas *canvas,
float x1,
float y1,
float x2,
float y2,
77 float via_x,
float via_y, uint8_t thickness = 4,
78 uint16_t color = 0xffff, uint8_t offset = 0);