m5stack-avatar
Loading...
Searching...
No Matches
Eyebrows.hpp
Go to the documentation of this file.
1
12
#ifndef M5AVATAR_EYEBROWS_HPP_
13
#define M5AVATAR_EYEBROWS_HPP_
14
15
#include <BoundingRect.h>
16
#include <DrawContext.h>
17
#include <Drawable.h>
18
19
#include "
DrawingUtils.hpp
"
20
namespace
m5avatar {
21
class
BaseEyebrow
:
public
Drawable
{
22
protected
:
23
uint16_t height_;
24
uint16_t width_;
25
bool
is_left_;
26
27
// caches
28
ColorPalette
*palette_;
29
uint16_t primary_color_;
30
uint16_t secondary_color_;
31
uint16_t background_color_;
32
int16_t center_x_;
33
int16_t center_y_;
34
Expression expression_;
35
36
public
:
37
BaseEyebrow
(
bool
is_left);
38
BaseEyebrow
(uint16_t width, uint16_t height,
bool
is_left);
39
void
update(M5Canvas *canvas,
BoundingRect
rect,
DrawContext
*ctx);
40
};
41
42
// Maro Mayu
43
class
EllipseEyebrow
:
public
BaseEyebrow
{
44
public
:
45
using
BaseEyebrow::BaseEyebrow;
46
void
draw(M5Canvas *canvas,
BoundingRect
rect,
DrawContext
*ctx);
47
};
48
49
class
BowEyebrow
:
public
BaseEyebrow
{
50
public
:
51
using
BaseEyebrow::BaseEyebrow;
52
void
draw(M5Canvas *canvas,
BoundingRect
rect,
DrawContext
*ctx);
53
};
54
55
class
RectEyebrow
:
public
BaseEyebrow
{
56
public
:
57
using
BaseEyebrow::BaseEyebrow;
58
void
draw(M5Canvas *canvas,
BoundingRect
rect,
DrawContext
*ctx);
59
};
60
61
}
// namespace m5avatar
62
63
#endif
DrawingUtils.hpp
drawing utils including geometry handling
m5avatar::BaseEyebrow
Definition:
Eyebrows.hpp:21
m5avatar::BoundingRect
Definition:
BoundingRect.h:10
m5avatar::BowEyebrow
Definition:
Eyebrows.hpp:49
m5avatar::ColorPalette
Definition:
ColorPalette.h:50
m5avatar::DrawContext
Definition:
DrawContext.h:22
m5avatar::Drawable
Definition:
Drawable.h:13
m5avatar::EllipseEyebrow
Definition:
Eyebrows.hpp:43
m5avatar::RectEyebrow
Definition:
Eyebrows.hpp:55
src
Eyebrows.hpp
Generated by
1.9.5