This commit is contained in:
tovjemam 2025-12-05 14:47:11 +01:00
parent b3451cbcc7
commit 796f0e9f4f

View File

@ -31,8 +31,7 @@ void PgmRenderer::DrawRectangle(const math::Vector& pos, const math::Vector& siz
void PgmRenderer::DrawCircle(const math::Vector& center, float radius)
{
// TODO: cast
RasterizeCircle(center.x, center.y, radius);
RasterizeCircle(static_cast<int>(center.x), static_cast<int>(center.y), static_cast<int>(radius));
}
void PgmRenderer::Save(const std::filesystem::path& path)
@ -84,6 +83,7 @@ void PgmRenderer::RasterizeLine(int x0, int y0, int x1, int y1)
while (true)
{
// draw a square of pixels for thickness
// could be done better but whatever
for (int i = -w / 2; i <= w / 2; i++)
{
for (int j = -w / 2; j <= w / 2; j++)