MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / draw

Method draw

src/Interface/Cursor.cpp:84–103  ·  view source on GitHub ↗

* Draws a pointer-shaped cursor graphic. */

Source from the content-addressed store, hash-verified

82 * Draws a pointer-shaped cursor graphic.
83 */
84void Cursor::draw()
85{
86 Surface::draw();
87 Uint8 color = _color;
88 int x1 = 0, y1 = 0, x2 = getWidth() - 1, y2 = getHeight() - 1;
89
90 lock();
91 for (int i = 0; i < 4; ++i)
92 {
93 drawLine(x1, y1, x1, y2, color);
94 drawLine(x1, y1, x2, getWidth() - 1, color);
95 x1++;
96 y1 += 2;
97 y2--;
98 x2--;
99 color++;
100 }
101 this->setPixel(4, 8, --color);
102 unlock();
103}
104
105}

Callers

nothing calls this directly

Calls 1

setPixelMethod · 0.80

Tested by

no test coverage detected