Numworks Epsilon  1.4.1
Graphing Calculator Operating System
cursor_view.cpp
Go to the documentation of this file.
1 #include "cursor_view.h"
2 
3 namespace Shared {
4 
5 void CursorView::drawRect(KDContext * ctx, KDRect rect) const {
6  KDCoordinate width = bounds().width();
7  KDCoordinate height = bounds().height();
8  ctx->fillRect(KDRect((width-1)/2, 0, 1, height), KDColorBlack);
9  ctx->fillRect(KDRect(0, (height-1)/2, width, 1), KDColorBlack);
10 }
11 
13  return KDSize(k_size, k_size);
14 }
15 
16 }
int16_t KDCoordinate
Definition: coordinate.h:6
Definition: size.h:6
KDSize minimalSizeForOptimalDisplay() const override
Definition: cursor_view.cpp:12
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: rect.h:26
void fillRect(KDRect rect, KDColor color)
Definition: context_rect.cpp:8
void drawRect(KDContext *ctx, KDRect rect) const override
Definition: cursor_view.cpp:5
KDCoordinate width() const
Definition: rect.h:39
KDCoordinate height() const
Definition: rect.h:40
KDRect bounds() const
Definition: view.cpp:157