Numworks Epsilon  1.4.1
Graphing Calculator Operating System
solid_color_view.cpp
Go to the documentation of this file.
2 
4  View(),
5  m_color(color)
6 {
7 }
8 
10  if (m_color != color) {
11  m_color = color;
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
void drawRect(KDContext *ctx, KDRect rect) const override
void markRectAsDirty(KDRect rect)
Definition: view.cpp:39
SolidColorView(KDColor color)
Definition: rect.h:26
void fillRect(KDRect rect, KDColor color)
Definition: context_rect.cpp:8
Definition: color.h:6
Definition: view.h:23
virtual void setColor(KDColor color)
KDRect bounds() const
Definition: view.cpp:157