Numworks Epsilon  1.4.1
Graphing Calculator Operating System
context_pixel.cpp
Go to the documentation of this file.
1 #include <kandinsky/context.h>
2 
4  KDPoint absolutePoint = p.translatedBy(m_origin);
5  if (m_clippingRect.contains(absolutePoint)) {
6  pushRect(KDRect(absolutePoint, 1, 1), &c);
7  }
8 }
9 
11  KDPoint absolutePoint = p.translatedBy(m_origin);
12  if (m_clippingRect.contains(absolutePoint)) {
13  KDColor result = KDColorBlack;
14  pullRect(KDRect(absolutePoint, 1, 1), &result);
15  return result;
16  }
17  return KDColorBlack;
18 }
void setPixel(KDPoint p, KDColor c)
bool contains(KDPoint p) const
Definition: rect.cpp:104
Definition: point.h:6
c(generic_all_nodes)
virtual void pullRect(KDRect rect, KDColor *pixels)=0
virtual void pushRect(KDRect, const KDColor *pixels)=0
constexpr KDColor KDColorBlack
Definition: color.h:41
Definition: rect.h:26
Definition: color.h:6
KDPoint translatedBy(KDPoint other) const
Definition: point.cpp:3
KDColor getPixel(KDPoint p)