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

Method GetWidgetDpi

src/linkgraph/linkgraph_gui.cpp:60–66  ·  view source on GitHub ↗

* Get a DPI for the widget we will be drawing to. * @param dpi DrawPixelInfo to fill with the desired dimensions. */

Source from the content-addressed store, hash-verified

58 * @param dpi DrawPixelInfo to fill with the desired dimensions.
59 */
60void LinkGraphOverlay::GetWidgetDpi(DrawPixelInfo *dpi) const
61{
62 const NWidgetBase *wi = this->window->GetWidget<NWidgetBase>(this->widget_id);
63 dpi->left = dpi->top = 0;
64 dpi->width = wi->current_x;
65 dpi->height = wi->current_y;
66}
67
68/**
69 * Rebuild the cache and recalculate which links and stations to be shown.

Callers 1

RebuildCacheMethod · 0.95

Calls 1

Tested by

no test coverage detected