Sfoglia il codice sorgente

[flutter] Skeleton.getBounds() takes clipping into consideration (see #2515)

Mario Zechner 1 anno fa
parent
commit
e1d7310511

+ 3 - 1
spine-cpp/spine-cpp-lite/spine-cpp-lite.cpp

@@ -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;
 }
 

+ 3 - 0
spine-flutter/CHANGELOG.md

@@ -1,3 +1,6 @@
+# 4.2.26
+- `Skeleton.getBounds()` takes clipping into consideration.
+
 # 4.2.25
 - Switch to spine-cpp-lite
 

+ 1 - 1
spine-flutter/example/android/build.gradle

@@ -26,6 +26,6 @@ subprojects {
     project.evaluationDependsOn(':app')
 }
 
-task clean(type: Delete) {
+tasks.register("clean", Delete) {
     delete rootProject.buildDir
 }

BIN
spine-flutter/lib/assets/libspine_flutter.wasm


+ 1 - 1
spine-flutter/pubspec.yaml

@@ -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