From bddb766facb25a932f8d3eba8a48f20fd52be0f4 Mon Sep 17 00:00:00 2001 From: houmain Date: Sun, 5 Feb 2023 19:14:06 +0100 Subject: [PATCH] Fixed debug output of vertices when rotated --- libs/rect_pack | 2 +- src/Definition.cpp | 5 ----- src/debug.cpp | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/rect_pack b/libs/rect_pack index 6df7393..fb3949e 160000 --- a/libs/rect_pack +++ b/libs/rect_pack @@ -1 +1 @@ -Subproject commit 6df73935e252ee9a0f9109fd66f12f8da9abd175 +Subproject commit fb3949ec72fe1fe3c43b92fca95aa33acce318fc diff --git a/src/Definition.cpp b/src/Definition.cpp index 41d260d..7211bcb 100644 --- a/src/Definition.cpp +++ b/src/Definition.cpp @@ -158,11 +158,6 @@ void apply_definition(Definition definition, check(arguments_left(), "invalid argument count"); return arguments[argument_index++]; }; - const auto check_real = [&]() { - auto value = to_real(check_string()); - check(value.has_value(), "invalid real number"); - return value.value(); - }; const auto check_path = [&]() { return utf8_to_path(check_string()); }; diff --git a/src/debug.cpp b/src/debug.cpp index e99a4ed..a94da55 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -79,8 +79,8 @@ namespace { auto v0 = sprite.vertices[i]; auto v1 = sprite.vertices[(i + 1) % sprite.vertices.size()]; if (sprite.rotated) { - v0 = rotate_cw(v0, sprite.trimmed_rect.w); - v1 = rotate_cw(v1, sprite.trimmed_rect.w); + v0 = rotate_cw(v0, sprite.trimmed_rect.h); + v1 = rotate_cw(v1, sprite.trimmed_rect.h); } v0.x *= scale_point_coord.x; v0.y *= scale_point_coord.y;