[tests] tighten up movement in BitmapSmoothMove #1682

This commit is contained in:
nick black 2021-10-11 02:48:31 -04:00 committed by nick black
parent 80d968a52e
commit 676b92187b

View File

@ -679,9 +679,9 @@ TEST_CASE("Bitmaps") {
vopts.flags = NCVISUAL_OPTION_NODEGRADE; vopts.flags = NCVISUAL_OPTION_NODEGRADE;
auto n = ncvisual_render(nc_, ncv, &vopts); auto n = ncvisual_render(nc_, ncv, &vopts);
REQUIRE(nullptr != n); REQUIRE(nullptr != n);
auto xpx = ncplane_dim_x(n_) * nc_->tcache.cellpixx; auto xpx = (ncplane_dim_x(n_) - 2) * nc_->tcache.cellpixx;
auto ypx = ncplane_dim_y(n_) * nc_->tcache.cellpixy; auto ypx = (ncplane_dim_y(n_) - 2) * nc_->tcache.cellpixy;
double xyrat = (double)xpx / ypx; double xyrat = (double)ypx / xpx;
for(unsigned xat = 0 ; xat < xpx ; ++xat){ for(unsigned xat = 0 ; xat < xpx ; ++xat){
vopts.x = xat / nc_->tcache.cellpixx; vopts.x = xat / nc_->tcache.cellpixx;
vopts.pxoffx = xat % nc_->tcache.cellpixx; vopts.pxoffx = xat % nc_->tcache.cellpixx;