Numworks Epsilon  1.4.1
Graphing Calculator Operating System
pattern_view.cpp
Go to the documentation of this file.
1 #include "pattern_view.h"
2 
3 namespace HardwareTest {
4 
6  m_pattern(Pattern::patternAtIndex(0))
7 {
8 }
9 
11  m_pattern = p;
13 }
14 
15 void PatternView::drawRect(KDContext * ctx, KDRect rect) const {
16  ctx->fillRect(rect, m_pattern.outlineColor());
17  ctx->fillRect(KDRect(k_outlineThickness, k_outlineThickness, bounds().width()-2*k_outlineThickness, bounds().height()-2*k_outlineThickness), m_pattern.fillColor());
18 }
19 
20 }
void markRectAsDirty(KDRect rect)
Definition: view.cpp:39
void drawRect(KDContext *ctx, KDRect rect) const override
Definition: rect.h:26
void fillRect(KDRect rect, KDColor color)
Definition: context_rect.cpp:8
void setPattern(Pattern p)
KDColor outlineColor() const
Definition: pattern.cpp:20
KDColor fillColor() const
Definition: pattern.cpp:16
KDRect bounds() const
Definition: view.cpp:157