MCPcopy Create free account
hub / github.com/dejwk/roo_display / setPixel

Method setPixel

test/addr_window_device_test.cpp:107–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105
106 private:
107 void setPixel(int16_t x, int16_t y, Color color) {
108 ASSERT_GE(x, 0);
109 ASSERT_GE(y, 0);
110 if (orientation_.isXYswapped()) {
111 std::swap(x, y);
112 }
113 ASSERT_LT(x, width());
114 ASSERT_LT(y, height());
115 if (orientation_.isRightToLeft()) x = width() - x - 1;
116 if (orientation_.isBottomToTop()) y = height() - y - 1;
117 data_[x + y * width()] = color;
118 }
119
120 int16_t width_, height_;
121 std::unique_ptr<Color[]> data_;

Callers

nothing calls this directly

Calls 3

isXYswappedMethod · 0.80
isRightToLeftMethod · 0.80
isBottomToTopMethod · 0.80

Tested by

no test coverage detected