Skip to content

Create a new buffer if necessary when setting an existing Graphic #869

Description

@kushalkolar

We can implement this pretty easily, would make things easier for users, tradeoff is that users are less aware that setting data this way is slower than setting data that fits in an existing buffer. We can just document it well.

image = fig[0, 0].add_image(np.random.rand(10, 10))

# allow this, internally delete the existing buffer 
# and world object and create a new one
image.data = np.random.rand(20, 20)

Might not have to create a new world object, might be possible to just replace the geometry I think.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions