Numworks Epsilon  1.4.1
Graphing Calculator Operating System
ok_view.cpp
Go to the documentation of this file.
1 #include "ok_view.h"
2 
3 namespace Shared {
4 
6  {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
7  {0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x45, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF},
8  {0xFF, 0xFF, 0xE1, 0x0C, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x0C, 0xE1, 0xFF, 0xFF},
9  {0xFF, 0xFF, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0xFF, 0xFF},
10  {0xFF, 0x0C, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x0C, 0xFF},
11  {0xE1, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x45, 0xE1},
12  {0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C},
13  {0x0C, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x0C, 0x00, 0x0C, 0xE1, 0xFF, 0x00, 0xFF, 0xFF, 0x0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, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0xFF, 0xFF},
23  {0xFF, 0xFF, 0xE1, 0x0C, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x0C, 0xE1, 0xFF, 0xFF},
24  {0xFF, 0xFF, 0xFF, 0xFF, 0x0C, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x45, 0x0C, 0xFF, 0xFF, 0xFF, 0xFF},
25  {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
26 };
27 
29 
30 void OkView::drawRect(KDContext * ctx, KDRect rect) const {
31  KDCoordinate width = bounds().width();
32  KDCoordinate height = bounds().height();
33  KDRect frame((width-k_okSize)/2, (height-k_okSize)/2, k_okSize, k_okSize);
35 }
36 
38  return KDSize(k_okSize, k_okSize);
39 }
40 
41 }
42 
KDSize minimalSizeForOptimalDisplay() const override
Definition: ok_view.cpp:37
int16_t KDCoordinate
Definition: coordinate.h:6
void blendRectWithMask(KDRect rect, KDColor color, const uint8_t *mask, KDColor *workingBuffer)
static constexpr KDCoordinate k_okSize
Definition: ok_view.h:13
KDColor s_okWorkingBuffer[OkView::k_okSize *OkView::k_okSize]
Definition: ok_view.cpp:28
unsigned char uint8_t
Definition: stdint.h:4
Definition: size.h:6
void drawRect(KDContext *ctx, KDRect rect) const override
Definition: ok_view.cpp:30
const uint8_t okMask[OkView::k_okSize][OkView::k_okSize]
Definition: ok_view.cpp:5
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: rect.h:26
Definition: color.h:6
KDCoordinate width() const
Definition: rect.h:39
KDCoordinate height() const
Definition: rect.h:40
KDRect bounds() const
Definition: view.cpp:157