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
5
PatternView::PatternView
() :
6
m_pattern(
Pattern
::patternAtIndex(0))
7
{
8
}
9
10
void
PatternView::setPattern
(
Pattern
p) {
11
m_pattern = p;
12
markRectAsDirty
(
bounds
());
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
}
HardwareTest::PatternView::PatternView
PatternView()
Definition:
pattern_view.cpp:5
HardwareTest::Pattern
Definition:
pattern.h:8
pattern_view.h
View::markRectAsDirty
void markRectAsDirty(KDRect rect)
Definition:
view.cpp:39
HardwareTest
Definition:
app.cpp:8
KDContext
Definition:
context.h:8
HardwareTest::PatternView::drawRect
void drawRect(KDContext *ctx, KDRect rect) const override
Definition:
pattern_view.cpp:15
KDRect
Definition:
rect.h:26
KDContext::fillRect
void fillRect(KDRect rect, KDColor color)
Definition:
context_rect.cpp:8
HardwareTest::PatternView::setPattern
void setPattern(Pattern p)
Definition:
pattern_view.cpp:10
HardwareTest::Pattern::outlineColor
KDColor outlineColor() const
Definition:
pattern.cpp:20
HardwareTest::Pattern::fillColor
KDColor fillColor() const
Definition:
pattern.cpp:16
View::bounds
KDRect bounds() const
Definition:
view.cpp:157
epsilon
apps
hardware_test
pattern_view.cpp
Generated by
1.8.14