diff --git a/spine-flutter/CHANGELOG.md b/spine-flutter/CHANGELOG.md index a5705002c..ff91d963a 100644 --- a/spine-flutter/CHANGELOG.md +++ b/spine-flutter/CHANGELOG.md @@ -4,6 +4,9 @@ # 4.2.18 * Fixes compilation errors due to API change in Flutter 3.16.0, see [this issue](https://github.com/EsotericSoftware/spine-runtimes/issues/2420). **Note**: Depending on this version requires your project to depend on Flutter >= 3.16.0 as well. +# 4.1.11 +# Fixed clipping bug, see https://github.com/EsotericSoftware/spine-runtimes/issues/2431 + # 4.1.10 # Update WASM binaries diff --git a/spine-flutter/src/spine_flutter.cpp b/spine-flutter/src/spine_flutter.cpp index 2a3909440..3f2e42e77 100644 --- a/spine-flutter/src/spine_flutter.cpp +++ b/spine-flutter/src/spine_flutter.cpp @@ -732,7 +732,10 @@ spine_render_command spine_skeleton_drawable_render(spine_skeleton_drawable draw for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) { Slot &slot = *skeleton->getDrawOrder()[i]; Attachment *attachment = slot.getAttachment(); - if (!attachment) continue; + if (!attachment) { + clipper.clipEnd(slot); + continue; + } // Early out if the slot color is 0 or the bone is not active if (slot.getColor().a == 0 || !slot.getBone().isActive()) { diff --git a/spine-sdl/src/spine-sdl-c.c b/spine-sdl/src/spine-sdl-c.c index 878c3da6f..3da709347 100644 --- a/spine-sdl/src/spine-sdl-c.c +++ b/spine-sdl/src/spine-sdl-c.c @@ -74,7 +74,10 @@ void spSkeletonDrawable_draw(spSkeletonDrawable *self, struct SDL_Renderer *rend for (int i = 0; i < skeleton->slotsCount; ++i) { spSlot *slot = skeleton->drawOrder[i]; spAttachment *attachment = slot->attachment; - if (!attachment) continue; + if (!attachment) { + spSkeletonClipping_clipEnd(clipper, slot); + continue; + } // Early out if the slot color is 0 or the bone is not active if (slot->color.a == 0 || !slot->bone->active) { diff --git a/spine-sdl/src/spine-sdl-cpp.cpp b/spine-sdl/src/spine-sdl-cpp.cpp index 40b52cc99..32636bc16 100644 --- a/spine-sdl/src/spine-sdl-cpp.cpp +++ b/spine-sdl/src/spine-sdl-cpp.cpp @@ -70,7 +70,10 @@ void SkeletonDrawable::draw(SDL_Renderer *renderer) { for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) { Slot &slot = *skeleton->getDrawOrder()[i]; Attachment *attachment = slot.getAttachment(); - if (!attachment) continue; + if (!attachment) { + clipper.clipEnd(slot); + continue; + } // Early out if the slot color is 0 or the bone is not active if (slot.getColor().a == 0 || !slot.getBone().isActive()) { diff --git a/spine-sfml/c/src/spine/spine-sfml.cpp b/spine-sfml/c/src/spine/spine-sfml.cpp index 539894774..3178876a0 100644 --- a/spine-sfml/c/src/spine/spine-sfml.cpp +++ b/spine-sfml/c/src/spine/spine-sfml.cpp @@ -168,7 +168,10 @@ namespace spine { for (int i = 0; i < skeleton->slotsCount; ++i) { spSlot *slot = skeleton->drawOrder[i]; spAttachment *attachment = slot->attachment; - if (!attachment) continue; + if (!attachment) { + spSkeletonClipping_clipEnd(clipper, slot); + continue; + } // Early out if slot is invisible if (slot->color.a == 0 || !slot->bone->active) { diff --git a/spine-sfml/cpp/src/spine/spine-sfml.cpp b/spine-sfml/cpp/src/spine/spine-sfml.cpp index ef3e40074..a32a6605c 100644 --- a/spine-sfml/cpp/src/spine/spine-sfml.cpp +++ b/spine-sfml/cpp/src/spine/spine-sfml.cpp @@ -94,7 +94,10 @@ namespace spine { for (unsigned i = 0; i < skeleton->getSlots().size(); ++i) { Slot &slot = *skeleton->getDrawOrder()[i]; Attachment *attachment = slot.getAttachment(); - if (!attachment) continue; + if (!attachment) { + clipper.clipEnd(slot); + continue; + } // Early out if the slot color is 0 or the bone is not active if (slot.getColor().a == 0 || !slot.getBone().isActive()) {