A bigger eraser or a work around
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
A bigger eraser or a work around
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
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:
or
Where "yourControl" might even be a polygon of odd shape, or a circle, whatever, is interesting.
Craig
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"
Code: Select all
remove paint from the extent of control "yourControl"
Craig
-
- Livecode Opensource Backer
- Posts: 10100
- Joined: Fri Feb 19, 2010 10:17 am
Re: A bigger eraser or a work around
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?
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?
Re: A bigger eraser or a work around
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.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:
orCode: Select all
remove paint from rect "yourRect"
Where "yourControl" might even be a polygon of odd shape, or a circle, whatever, is interesting.Code: Select all
remove paint from the extent of control "yourControl"
Craig
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: A bigger eraser or a work around
If you can open the stack at all it's probably not corrupt. What problems are you seeing?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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: A bigger eraser or a work around
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.FourthWorld wrote: If you can open the stack at all it's probably not corrupt. What problems are you seeing?
Code: Select all
set the eraser to 1165
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: A bigger eraser or a work around
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?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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: A bigger eraser or a work around
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.FourthWorld wrote: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?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.
EDIT: And yes I did change the ID number in the script appropriately before you ask.

Re: A bigger eraser or a work around
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
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
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
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.Da_Elf wrote: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
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
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
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.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
Re: A bigger eraser or a work around
thank you. thats all i needed was a point in the right direction