#include "GameKitGrid.h" namespace GameKit { lv_point_t gridToPx(const GridSpec& grid, GridPos pos) { return lv_point_t { static_cast(grid.originX + pos.x * grid.cellPx), static_cast(grid.originY + pos.y * grid.cellPx) }; } bool gridContains(const GridSpec& grid, GridPos pos) { return pos.x >= 0 && pos.y >= 0 && pos.x < grid.cols && pos.y < grid.rows; } } // namespace GameKit