1
code: cpp
# include <Siv3D.hpp> // OpenSiv3D v0.2.8
void Main()
{
Graphics::SetBackground(ColorF(0.8, 0.9, 1.0));
constexpr double CellSize = 100.0;
const Font font(30);
Grid<int32> grid(4, 4);
while (System::Update())
{
Transformer2D t(Mat3x2::Translate(120, 40));
RectF(400).stretched(5).rounded(3).draw(ColorF(0.7));
for (auto p : step(Size(4, 4)))
{
const RectF rect(p * CellSize, CellSize);
rect.stretched(-5).rounded(3).draw(ColorF(0.8));
font(gridp).drawAt(rect.center()); }
}
}
https://gyazo.com/2a4cfa4a3aa7efacfc7bfe320a2db804