Fix vecr::renderer primitive bbox
This commit is contained in:
parent
1bd3f30be4
commit
d7c8d8710c
1 changed files with 2 additions and 2 deletions
|
|
@ -65,9 +65,9 @@ namespace psemek::vecr
|
||||||
int ymin = std::max<int>(0, std::floor(box[1].min) * samples_);
|
int ymin = std::max<int>(0, std::floor(box[1].min) * samples_);
|
||||||
int ymax = std::min<int>(canvas_.height() - 1, std::ceil(box[1].max) * samples_);
|
int ymax = std::min<int>(canvas_.height() - 1, std::ceil(box[1].max) * samples_);
|
||||||
|
|
||||||
for (int y = ymin; y < ymax; ++y)
|
for (int y = ymin; y <= ymax; ++y)
|
||||||
{
|
{
|
||||||
for (int x = xmin; x < xmax; ++x)
|
for (int x = xmin; x <= xmax; ++x)
|
||||||
{
|
{
|
||||||
geom::point const center{(x + 0.5f) / samples_, (y + 0.5f) / samples_};
|
geom::point const center{(x + 0.5f) / samples_, (y + 0.5f) / samples_};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue