Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android - How to merge and move text around on image

hi
Here's what i want to do.
- Open a jpg in full screen.
- Type text on the jpg.
- able to move that text where i want it positioned on the bitmap.
- moving of text must be done with a finger (not in code).

kind of like creating a personal funny Christmas card...

I find loots of example of writing text onto Bitmap but nothing about moving that text around.

Help is needed!

EDIT - The image and added text must be saved as a new jpg with same size

like image 263
Erik Avatar asked May 05 '11 15:05

Erik


1 Answers

  1. Draw the bitmap onto the screen, then draw the text onto it at an initial x,y (e.g. the center), following the examples you found.

  2. Receive input events describing finger-dragging movements.

  3. Use those input events to change the x,y values for drawing the text.

  4. Redraw the bitmap and the text onto the screen, with the text being at the new x,y location.

  5. Repeat from step 2.

Let us know if there are particular parts of this that you need more elaboration on.

like image 177
LarsH Avatar answered Nov 15 '22 07:11

LarsH