disappearing image (it won't stick...)
in
Programming Questions
•
1 year ago
I am not posting my code because I think it's not a good idea...
...however my problem is probably a common mistake and I think it's easy to understand without code.
I am using copy (not copy()) or else image to copy an area of the canvas that has been selected with x and y parameters.
I am trying to paste in on permanently so that it is not erased. So I am copying it in the draw method of a layer with a background (0,0) and as far as I can tell, I am on that layer...
When I copy it with say, pressing a key or clicking the mouse, the image will copy for a second and then disappear. Or else when I fiddle with the conditional, it will copy it until I press another key.
In other words, the copying happens when there is a mouse or key event, and then it disappears when that event is stopped or when a new mouse or key event occurs.
It's behaving the same way whether I use "copy" or "image".
So my question is, can I implement "copy" and "image" as a result of key or mouse events and then make multiple iterations that "stick" to my top layer?
...however my problem is probably a common mistake and I think it's easy to understand without code.
I am using copy (not copy()) or else image to copy an area of the canvas that has been selected with x and y parameters.
I am trying to paste in on permanently so that it is not erased. So I am copying it in the draw method of a layer with a background (0,0) and as far as I can tell, I am on that layer...
When I copy it with say, pressing a key or clicking the mouse, the image will copy for a second and then disappear. Or else when I fiddle with the conditional, it will copy it until I press another key.
In other words, the copying happens when there is a mouse or key event, and then it disappears when that event is stopped or when a new mouse or key event occurs.
It's behaving the same way whether I use "copy" or "image".
So my question is, can I implement "copy" and "image" as a result of key or mouse events and then make multiple iterations that "stick" to my top layer?
1