Numworks Epsilon
1.4.1
Graphing Calculator Operating System
solid_color_view.cpp
Go to the documentation of this file.
1
#include <
escher/solid_color_view.h
>
2
3
SolidColorView::SolidColorView
(
KDColor
color) :
4
View
(),
5
m_color(color)
6
{
7
}
8
9
void
SolidColorView::setColor
(
KDColor
color) {
10
if
(m_color != color) {
11
m_color = color;
12
markRectAsDirty
(
bounds
());
13
}
14
}
15
16
void
SolidColorView::drawRect
(
KDContext
* ctx,
KDRect
rect)
const
{
17
ctx->
fillRect
(rect, m_color);
18
}
19
20
#if ESCHER_VIEW_LOGGING
21
const
char
* SolidColorView::className()
const
{
22
return
"SolidColorView"
;
23
}
24
25
void
SolidColorView::logAttributes(std::ostream &os)
const
{
26
View::logAttributes(os);
27
os <<
" color=\""
<< (int)m_color <<
"\""
;
28
}
29
#endif
SolidColorView::drawRect
void drawRect(KDContext *ctx, KDRect rect) const override
Definition:
solid_color_view.cpp:16
View::markRectAsDirty
void markRectAsDirty(KDRect rect)
Definition:
view.cpp:39
SolidColorView::SolidColorView
SolidColorView(KDColor color)
Definition:
solid_color_view.cpp:3
solid_color_view.h
KDContext
Definition:
context.h:8
KDRect
Definition:
rect.h:26
KDContext::fillRect
void fillRect(KDRect rect, KDColor color)
Definition:
context_rect.cpp:8
KDColor
Definition:
color.h:6
View
Definition:
view.h:23
SolidColorView::setColor
virtual void setColor(KDColor color)
Definition:
solid_color_view.cpp:9
View::bounds
KDRect bounds() const
Definition:
view.cpp:157
epsilon
escher
src
solid_color_view.cpp
Generated by
1.8.14