Skip to content

Commit

Permalink
[flutter] Skeleton.getBounds() takes clipping into consideration (see #…
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed May 21, 2024
1 parent b8f0aaa commit e1d7310
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,9 @@ spine_bounds spine_skeleton_get_bounds(spine_skeleton skeleton) {
if (skeleton == nullptr) return (spine_bounds) bounds;
Skeleton *_skeleton = (Skeleton *) skeleton;
Vector<float> vertices;
_skeleton->getBounds(bounds->x, bounds->y, bounds->width, bounds->height, vertices);
SkeletonClipping clipper;

_skeleton->getBounds(bounds->x, bounds->y, bounds->width, bounds->height, vertices, &clipper);
return (spine_bounds) bounds;
}

Expand Down
3 changes: 3 additions & 0 deletions spine-flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 4.2.26
- `Skeleton.getBounds()` takes clipping into consideration.

# 4.2.25
- Switch to spine-cpp-lite

Expand Down
2 changes: 1 addition & 1 deletion spine-flutter/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Binary file modified spine-flutter/lib/assets/libspine_flutter.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion spine-flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: spine_flutter
description: The official Spine Flutter Runtime to load, display and interact with Spine animations.
version: 4.2.25
version: 4.2.26
homepage: https://esotericsoftware.com
repository: https://github.com/esotericsoftware/spine-runtimes
issue_tracker: https://github.com/esotericsoftware/spine-runtimes/issues
Expand Down

0 comments on commit e1d7310

Please sign in to comment.