Skip to content

Every Shape operation should return a new shape #69

@CoffeeStraw

Description

@CoffeeStraw

In frame-per-frame operations involving shapes, it could happen that users want to alter a shape from the original state at every iteration. Some of the current operations modify the shape in place, preventing further re-use. The current workflow involves making a manual copy of the shape and then do the transformation on it, but it's inefficient (and there is no copy method either, so to copy users do Shape(other_shape.drawing_cmds)).

We considered adding a in_place flag to all shapes' operations, but it could lead to undesired side effects and inconsistencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions