-
If you use the But Python's copy.copy can't do it either. Should it be able to copy Py5Graphics? I guess this is more of my curiosity than an "urgent need"... but, the question remains, how would you copy a Py5Graphics object?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Python's copy library isn't going to be able to copy py5 objects because it isn't able to copy the Java objects. And it seems Processing doesn't do that either, because that's not how the However, it should be possible to simulate a copy to a new Py5Graphics object by using |
Beta Was this translation helpful? Give feedback.
Python's copy library isn't going to be able to copy py5 objects because it isn't able to copy the Java objects. And it seems Processing doesn't do that either, because that's not how the
copy()
method works.However, it should be possible to simulate a copy to a new Py5Graphics object by using
copy()
and then drawing the Py5Image object to a properly sized Py5Graphics object with thebackground()
method. But wait: what about the fill, stroke, stroke weight settings, etc? Getting all of that duplicated would be a lot of work.