Skip to content

Commit

Permalink
Fixed debug output of vertices when rotated
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Feb 5, 2023
1 parent 717ad5d commit bddb766
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libs/rect_pack
Submodule rect_pack updated 1 files
+5 −0 rect_pack.cpp
5 changes: 0 additions & 5 deletions src/Definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
};
Expand Down
4 changes: 2 additions & 2 deletions src/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bddb766

Please sign in to comment.