Page 1 of 1

A bigger eraser or a work around

Posted: Tue Mar 10, 2015 3:10 pm
by magice
The maximum size of the eraser tool is 32x32 pixels. I assume this is because of cursor size limitations in windows. When I try to apply a larger image (128x128) LC shuts down. Is there a workaround? It seems to me that the paint tool itself had to be coded, so there must be a way to say "remove the paint from an image in a designated area"

Re: A bigger eraser or a work around

Posted: Tue Mar 10, 2015 4:30 pm
by dunbarx
Hi.

On a Mac, I find no issue with very large erasers, set say, from a large img imported as a control and the eraser property set to that ID. Must be a Windows thing.

But your thought of being able to:

Code: Select all

remove paint from rect "yourRect"
or

Code: Select all

remove paint from the extent of control "yourControl"
Where "yourControl" might even be a polygon of odd shape, or a circle, whatever, is interesting.

Craig

Re: A bigger eraser or a work around

Posted: Tue Mar 10, 2015 7:37 pm
by richmond62
If I create a new stack and then squiggle all over it with the brush tool
as soon as I stop squiggling I end up with an image overlaying any controls
beneath it.

So surely the best way to "remove paint" is simply to delete the last image?
rPaint1.png
rPaint2.png

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 1:01 am
by magice
dunbarx wrote:Hi.

On a Mac, I find no issue with very large erasers, set say, from a large img imported as a control and the eraser property set to that ID. Must be a Windows thing.

But your thought of being able to:

Code: Select all

remove paint from rect "yourRect"
or

Code: Select all

remove paint from the extent of control "yourControl"
Where "yourControl" might even be a polygon of odd shape, or a circle, whatever, is interesting.

Craig
After reading your post I did some experimentation. Nothing seems to work in my stack. However i created a new stack and it works. I believe that my stack is corrupt. It might have something to do with the fact that I am revamping an app that I wrote over five years ago in a much older version (RunRev 3.0). I guess I need to start over from scratch.

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 3:29 am
by FourthWorld
magice wrote:Nothing seems to work in my stack. However i created a new stack and it works. I believe that my stack is corrupt. It might have something to do with the fact that I am revamping an app that I wrote over five years ago in a much older version (RunRev 3.0). I guess I need to start over from scratch.
If you can open the stack at all it's probably not corrupt. What problems are you seeing?

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 1:07 pm
by magice
FourthWorld wrote: If you can open the stack at all it's probably not corrupt. What problems are you seeing?
in my original stack, I imported an image as a control. The ID of the image is 1165. When I use the following code, the stack and LC shuts completely down instantly.

Code: Select all

set the eraser to 1165
In a new stack the same code works fine. I have spent most of the night copying and pasting all of the items and scripts into a new stack. At this time I have completely rebuilt the stack and it seems to be working fine.

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 4:08 pm
by FourthWorld
magice wrote:in my original stack, I imported an image as a control. The ID of the image is 1165. When I use the following code, the stack and LC shuts completely down instantly.
It sounds like at worse the image object alone may be corrupted, but the stack is fine. What happens if you delete the image and replace it with a new copy?

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 4:19 pm
by magice
FourthWorld wrote:
magice wrote:in my original stack, I imported an image as a control. The ID of the image is 1165. When I use the following code, the stack and LC shuts completely down instantly.
It sounds like at worse the image object alone may be corrupted, but the stack is fine. What happens if you delete the image and replace it with a new copy?
The same thing, I tried it several times with GIFs, PNGs, and JPGs of diferent sizes. The Gif's and PNG's I tried both with and without alpha channels. Anyway, I am not going to worry about it now. The new stack is working perfectly.

EDIT: And yes I did change the ID number in the script appropriately before you ask. :)

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 7:17 pm
by Da_Elf
the paintbrush works when editing inside of livecode but how is it used when working outside of the livecode interface as an external program? ive searched for how to make drawing programs and i only found the method of creating a graphic and it stores points for the graphic

Re: A bigger eraser or a work around

Posted: Wed Mar 11, 2015 7:27 pm
by magice
Da_Elf wrote:the paintbrush works when editing inside of livecode but how is it used when working outside of the livecode interface as an external program? ive searched for how to make drawing programs and i only found the method of creating a graphic and it stores points for the graphic

Just include "brushes" and it works in a stand alone as well.

Re: A bigger eraser or a work around

Posted: Thu Mar 12, 2015 1:18 pm
by Da_Elf
how do you "include" it? ive been looking for a walkthrough but cant even find much info anywhere on the site

Re: A bigger eraser or a work around

Posted: Thu Mar 12, 2015 1:27 pm
by magice
Da_Elf wrote:how do you "include" it? ive been looking for a walkthrough but cant even find much info anywhere on the site
In standalone settings, I believe on the first page, there is a radio button to check to enable the inclusion then a checkbox to include it.

Re: A bigger eraser or a work around

Posted: Thu Mar 12, 2015 11:34 pm
by Da_Elf
right so i see how to include brushes. now how is it actually used? On the livecode page im not getting any tutorials, none googleing it, and typing paint into dictionary doesnt give me much info on its use.

this is the closest i can come to its use
http://lessons.runrev.com/m/4603/l/44144-using-images

Re: A bigger eraser or a work around

Posted: Fri Mar 13, 2015 2:48 am
by magice
Da_Elf wrote:right so i see how to include brushes. now how is it actually used? On the livecode page im not getting any tutorials, none googleing it, and typing paint into dictionary doesnt give me much info on its use.

this is the closest i can come to its use
http://lessons.runrev.com/m/4603/l/44144-using-images
Look up "choose" in the dictionary. You can also look up brush, eraser,dropper etc, but I believe choose will lead you to the most info. Also keep in mind that you cannot edit a referenced image. You have to import paint from the image.

Re: A bigger eraser or a work around

Posted: Fri Mar 13, 2015 3:34 am
by Da_Elf
thank you. thats all i needed was a point in the right direction