how can I write text on Image or shape ,and become(the image and the text) one unit,so when i drag the image,also the text within it is dragged.
Just display the image make a small offset with translate() and display the text()
When you use another translate before image() both will be moved as one item
Alternatively make an PGraphics pg containing the image and the text. Then just move the pg
Thank u v.much
Welcome to the Processing forum.
There are examples in the Processing IDE (File > Examples…)
Using this one:
Add to setup:
Add a line to display text after the image:
text("Space: The final frontier.", width-400, 50);