m5stack-avatar
|
drawing utils including geometry handling More...
#include <BoundingRect.h>
#include <DrawContext.h>
#include <Drawable.h>
Go to the source code of this file.
Functions | |
void | m5avatar::rotatePoint (float &x, float &y, float angle) |
void | m5avatar::rotatePointAround (float &x, float &y, float angle, float cx, float cy) |
void | m5avatar::fillRotatedRect (M5Canvas *canvas, uint16_t cx, uint16_t cy, uint16_t w, uint16_t h, float angle, uint16_t color) |
void | m5avatar::fillRectRotatedAround (M5Canvas *canvas, float top_left_x, float top_left_y, float bottom_right_x, float bottom_right_y, float angle, uint16_t cx, uint16_t cy, uint16_t color) |
void | m5avatar::computeParamsOfCirclePassingThroughThreePoints (float &r, float &cx, float &cy, float x1, float y1, float x2, float y2, float x3, float y3) |
compute circle parameters though 3 points, (x1,y1), (x2,y2), and (x3,y3) More... | |
void | m5avatar::computeAnglesOfArcPassingThroughThreePoints (float &min_angle, float &max_angle, float &via_angle, float x1, float y1, float x2, float y2, float via_x, float via_y, float cx, float cy) |
void | m5avatar::drawCircle (M5Canvas *canvas, float x1, float y1, float x2, float y2, float x3, float y3, uint16_t color) |
void | m5avatar::drawArc (M5Canvas *canvas, float x1, float y1, float x2, float y2, float via_x, float via_y, uint8_t thickness=4, uint16_t color=0xffff, uint8_t offset=0) |
draw arc with three waypoints More... | |
void | m5avatar::fillArc (M5Canvas *canvas, float x1, float y1, float x2, float y2, float via_x, float via_y, uint8_t thickness, uint16_t color, uint8_t offset) |
drawing utils including geometry handling
void m5avatar::computeParamsOfCirclePassingThroughThreePoints | ( | float & | r, |
float & | cx, | ||
float & | cy, | ||
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
float | x3, | ||
float | y3 | ||
) |
compute circle parameters though 3 points, (x1,y1), (x2,y2), and (x3,y3)
r | radius |
cx | center of x |
cy | center of y |
x1 | |
y1 | |
x2 | |
y2 | |
x3 | |
y3 |
void m5avatar::drawArc | ( | M5Canvas * | canvas, |
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
float | via_x, | ||
float | via_y, | ||
uint8_t | thickness = 4 , |
||
uint16_t | color = 0xffff , |
||
uint8_t | offset = 0 |
||
) |
draw arc with three waypoints
canvas | |
x1 | |
y1 | |
x2 | |
y2 | |
x3 | |
y3 | |
thickness | |
clockwise | |
color |