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

Function GfxDrawLineUnscaled

src/gfx.cpp:401–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401void GfxDrawLineUnscaled(int x, int y, int x2, int y2, PixelColour colour)
402{
403 DrawPixelInfo *dpi = _cur_dpi;
404 if (GfxPreprocessLine(dpi, x, y, x2, y2, 1)) {
405 GfxDoDrawLine(dpi->dst_ptr,
406 UnScaleByZoom(x, dpi->zoom), UnScaleByZoom(y, dpi->zoom),
407 UnScaleByZoom(x2, dpi->zoom), UnScaleByZoom(y2, dpi->zoom),
408 UnScaleByZoom(dpi->width, dpi->zoom), UnScaleByZoom(dpi->height, dpi->zoom), colour, 1);
409 }
410}
411
412/**
413 * Draws the projection of a parallelepiped.

Callers 1

DrawBoxFunction · 0.85

Calls 3

GfxPreprocessLineFunction · 0.85
GfxDoDrawLineFunction · 0.85
UnScaleByZoomFunction · 0.85

Tested by

no test coverage detected