creating a bottom that behaves like an eraser please help

387 views
Skip to first unread message

pravea sobolalliv

unread,
Jun 2, 2014, 12:18:56 AM6/2/14
to mitappinv...@googlegroups.com

SteveJG

unread,
Jun 2, 2014, 7:51:33 AM6/2/14
to mitappinv...@googlegroups.com
Could you tells us more about what you want to erase?

Do you want to 'erase' text from a Label or text string?

Do you want to 'erase' lines from a Canvas?

Can you give us an example?

Have you tried some blocks to do what you want to do and if you did, what do the blocks look like?   Please post a png or jpg image of you blocks.

Regards,
Steve

pravea sobolalliv

unread,
Jun 2, 2014, 10:37:35 PM6/2/14
to mitappinv...@googlegroups.com
His Steve,
 yes i want to delete lines and dots from the canvas, i will later send you the blocks, iam working on it
thanks

SteveJG

unread,
Jun 3, 2014, 7:52:54 AM6/3/14
to mitappinv...@googlegroups.com
To erase all the dots and lines drawn on a Canvas >      call Canvas1.Clear     That command 'erases' everything.

The Canvas control does not have an 'UnDo' function, so there is no way to back up and return to a previous state of the canvas unless you continually save 
'images' of the canvas.  You can however, change the  'painting' color.       set Canvas1.PaintColor to   the background color of the canvas.  The background of the Canvas is initially white I believe.
So, it is possible you can 'erase' by   set Canvas1.PaintColor to   Canvas1.BackgroundColor.  When you are done,  set Canvas1.PaintColor to  whatever you started drawing with.

Does that work?

Regards,
Steve

pravea sobolalliv

unread,
Jun 4, 2014, 12:44:00 AM6/4/14
to mitappinv...@googlegroups.com
Iam currently working with the paint pot tutorial, I setted up the camera, share bottom and the image picker so, so whether an image is  taken from the camera or image is imported from the photo's phone gallery once that image is all set it up as a background image, i paint on it  and iam using the call canvas1.clear wich erases everything, but what i want is an eraser that delets drawing parcially from the canvas by dragging my finger on it  and erase just the lines i don't like

Thanks!

Taifun

unread,
Jun 4, 2014, 3:59:31 PM6/4/14
to mitappinv...@googlegroups.com
see these threads https://groups.google.com/forum/#!searchin/programming-with-app-inventor/canvas$20undo
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by  Taifun.         


Advice: Before posting, it's a good idea to search in this forum. Many others have likely run into problems similar to yours. How to search see screenshot.




Reply all
Reply to author
Forward
0 new messages