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

Function drawVLine

src/roo_display/shape/basic.cpp:63–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void drawVLine(DisplayOutput &device, int16_t x0, int16_t y0, int16_t y1,
64 Color color, const Box &clip_box, BlendingMode mode) {
65 if (x0 > clip_box.xMax() || x0 < clip_box.xMin() || y0 > clip_box.yMax() ||
66 y1 < clip_box.yMin() || y1 < y0) {
67 return;
68 }
69
70 if (y0 < clip_box.yMin()) y0 = clip_box.yMin();
71 if (y1 > clip_box.yMax()) y1 = clip_box.yMax();
72
73 device.fillRects(mode, color, &x0, &y0, &x0, &y1, 1);
74}
75
76void Line::drawTo(const Surface &s) const {
77 int16_t x0 = x0_ + s.dx(), y0 = y0_ + s.dy();

Callers 1

drawToMethod · 0.85

Calls 5

xMaxMethod · 0.80
xMinMethod · 0.80
yMaxMethod · 0.80
yMinMethod · 0.80
fillRectsMethod · 0.45

Tested by

no test coverage detected