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

Function DrawRectOutline

src/gfx.cpp:463–469  ·  view source on GitHub ↗

* Draw the outline of a Rect * @param r Rect to draw. * @param colour Colour of the outline. * @param width Width of the outline. * @param dash Length of dashes for dashed lines. 0 means solid lines. */

Source from the content-addressed store, hash-verified

461 * @param dash Length of dashes for dashed lines. 0 means solid lines.
462 */
463void DrawRectOutline(const Rect &r, PixelColour colour, int width, int dash)
464{
465 GfxDrawLine(r.left, r.top, r.right, r.top, colour, width, dash);
466 GfxDrawLine(r.left, r.top, r.left, r.bottom, colour, width, dash);
467 GfxDrawLine(r.right, r.top, r.right, r.bottom, colour, width, dash);
468 GfxDrawLine(r.left, r.bottom, r.right, r.bottom, colour, width, dash);
469}
470
471/**
472 * Set the colour remap to be for the given colour.

Callers 3

DrawWidgetMethod · 0.85
DrawMethod · 0.85
DrawOutlineFunction · 0.85

Calls 1

GfxDrawLineFunction · 0.85

Tested by

no test coverage detected