MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / DrawLine

Method DrawLine

src/blitter/8bpp_base.cpp:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void Blitter_8bppBase::DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, PixelColour colour, int width, int dash)
38{
39 this->DrawLineGeneric(x, y, x2, y2, screen_width, screen_height, width, dash, [=](int x, int y) {
40 *((uint8_t *)video + x + y * _screen.pitch) = colour.p;
41 });
42}
43
44void Blitter_8bppBase::DrawRect(void *video, int width, int height, PixelColour colour)
45{

Callers 1

GfxDoDrawLineFunction · 0.45

Calls 1

DrawLineGenericMethod · 0.80

Tested by

no test coverage detected