Skip to content
This repository was archived by the owner on May 23, 2026. It is now read-only.
This repository was archived by the owner on May 23, 2026. It is now read-only.

Masking Problems (fix inside) #20

Description

@aherbig

In the routine:

static void sDrawPlacedObject(SwiffRenderState *state, SwiffPlacedObject *placedObject)
of the SwiffRenderer there are two early returns.

// Bail out if placedObject is hidden
if (placedObjectIsHidden) {
...
}

and

// Bail out if renderBounds is not in the clipBoundingBox
CGRect renderBounds = CGRectApplyAffineTransform([definition renderBounds], newTransform);
if (!CGRectIntersectsRect(renderBounds, state->clipBoundingBox)) {
...
}

If the code returns at those points, the code needed for correct masking that is at the end of sDrawPlacedObject never gets called and there are display errors.

if (placedObjectClipDepth) {
sStartClipping(state, placedObjectClipDepth);
state->isBuildingClippingPath = NO;
state->skipUntilClipDepth = NO;
}

Fixed it by copying that last code snippet right before the return calls above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions