Swap incorrect width/height mapping (#409)

width and height were being set using the incorrect axes resulting in incorrect canvas dimensions

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Jhon Adams
2022-06-01 12:13:39 -07:00
committed by GitHub
parent ed5b4cec49
commit b63aa9e375
3 changed files with 7 additions and 6 deletions

View File

@@ -871,8 +871,8 @@ Element canvas(int width, int height, std::function<void(Canvas&)> fn) {
}
void Render(Screen& screen) final {
int width = (box_.y_max - box_.y_min + 1) * 2;
int height = (box_.x_max - box_.x_min + 1) * 4;
int width = (box_.x_max - box_.x_min + 1) * 2;
int height = (box_.y_max - box_.y_min + 1) * 4;
canvas_ = Canvas(width, height);
fn_(canvas_);
CanvasNodeBase::Render(screen);