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"
20namespace m5avatar {
21class 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
44 public:
45 using BaseEyebrow::BaseEyebrow;
46 void draw(M5Canvas *canvas, BoundingRect rect, DrawContext *ctx);
47};
48
49class BowEyebrow : public BaseEyebrow {
50 public:
51 using BaseEyebrow::BaseEyebrow;
52 void draw(M5Canvas *canvas, BoundingRect rect, DrawContext *ctx);
53};
54
55class 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
drawing utils including geometry handling
Definition: Eyebrows.hpp:21
Definition: BoundingRect.h:10
Definition: Eyebrows.hpp:49
Definition: ColorPalette.h:50
Definition: DrawContext.h:22
Definition: Drawable.h:13
Definition: Eyebrows.hpp:43
Definition: Eyebrows.hpp:55