You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Skin created for a costume should have the same bounds as that costume.
Actual Behavior
A Skin created for a Wx0 or 0xH (for any value of W or H) goes through the setEmptyImageData path which always leads to a 1x1 image (which is fine) and matching bounds (arguably not fine). The difference can be detected through fencing behavior and probably a few other ways.
This led me down a bit of an investigation, but the TL;DR is that I have a patch that won't work until scratchfoundation/scratch-vm#2314 is merged (and preferably, setRotationCenter is removed).
This is handled at fence-time in 2.0, but doing something similar here would be kind of janky in my opinion (probably requiring some rotation-center/rectangle coordinate conversion, and possibly creating GC pressure by creating a new Rectangle every time a zero-size sprite is moved).
Once the API for setting a drawable's rotation center is removed (drawables themselves haven't had rotation centers since late 2016), the setSVG check will work.
Expected Behavior
A Skin created for a costume should have the same bounds as that costume.
Actual Behavior
A Skin created for a Wx0 or 0xH (for any value of W or H) goes through the
setEmptyImageData
path which always leads to a 1x1 image (which is fine) and matching bounds (arguably not fine). The difference can be detected through fencing behavior and probably a few other ways.Steps to Reproduce
These steps will work until we fix #434
pen down
andforever { go to random position }
to see the fencing behavior.Example (thanks @fsih!):
The text was updated successfully, but these errors were encountered: