MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / drawBatteryOutline

Method drawBatteryOutline

src/components/themes/BaseTheme.cpp:48–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46} // namespace
47
48void BaseTheme::drawBatteryOutline(const GfxRenderer& renderer, int x, int y, int battWidth, int rectHeight) {
49 // Top line
50 renderer.drawLine(x + 1, y, x + battWidth - 3, y);
51 // Bottom line
52 renderer.drawLine(x + 1, y + rectHeight - 1, x + battWidth - 3, y + rectHeight - 1);
53 // Left line
54 renderer.drawLine(x, y + 1, x, y + rectHeight - 2);
55 // Battery end
56 renderer.drawLine(x + battWidth - 2, y + 1, x + battWidth - 2, y + rectHeight - 2);
57 renderer.drawPixel(x + battWidth - 1, y + 3);
58 renderer.drawPixel(x + battWidth - 1, y + rectHeight - 4);
59 renderer.drawLine(x + battWidth - 0, y + 4, x + battWidth - 0, y + rectHeight - 5);
60}
61
62void BaseTheme::drawBatteryLightningBolt(const GfxRenderer& renderer, int boltX, int boltY) {
63 // Draw lightning bolt (white/inverted on black fill for visibility)

Callers

nothing calls this directly

Calls 2

drawLineMethod · 0.80
drawPixelMethod · 0.80

Tested by

no test coverage detected