Skip to content

Effective bounds of zero-width or zero-height skin/costume are incorrect #570

Open
@cwillisf

Description

@cwillisf

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

  1. Create or edit a project which uses the pen extension
  2. Create or edit a costume with non-zero width and height. The default cat costume is fine.
  3. Add a perfectly horizontal or vertical line
  4. Delete everything from the costume EXCEPT for the perfectly horizontal or vertical line.
  5. Adjust the rotation center so that it is outside the model's bounds.
  6. Use pen down and forever { go to random position } to see the fencing behavior.

Example (thanks @fsih!):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions