Page 1 of 2

Paint bucket issue

Posted: Sat Dec 30, 2017 9:55 pm
by jmburnod
Hi All,
When i use paint bucket to change color of an uniform area, some points, area or line don't take the selected color.
I tested it with versions 7.0.6, 8.1.6 and 8.1.8 with the same result.
To reproduce it:
1. choose large brush and a color (blue)
2. draw a large area
3. Choose bucket tool
4. choose an other color (red)
5. click on the blue area
Unfortunately, that make paint bucket unusable while that is a precious tool for paint app for kids.
Do you consider this as a bug ?
Best regards
Jean-Marc

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 12:35 am
by quailcreek
I tried this in LC 8.1.8 and 8.1.9 rc1 and it works fine. I did notice that the brush tool shape pallet gets placed to the left of the tools pallet. So if your tool pallet is close the the left of the screen the tool shape pallet could be placed off screen. That is the only bug I see.

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 10:06 am
by richmond62
Oddly enough, after 16 years of working with RR/LiveCode I have never used the Paint Tools:
I've always viewed them as needless leftovers from the HyperCard heritage. 8)

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 11:24 am
by jmburnod
Thanks for your quick reply.
I dont understand why it works for you.
Here is a stack with two examples bad results.

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 11:31 am
by richmond62
Screen Shot 2017-12-31 at 12.28.28 pm.png
Screen Shot 2017-12-31 at 12.28.28 pm.png (15.26 KiB) Viewed 7414 times
I suspect that the paint tools in LiveCode detect subtle differences in the colour of your initial
shapes . . .

IF a shape contains a 100% uniform colour the paint tools should fill it entirely:
I think your shapes look 100% uniform to the human eye, but not to the computer.

My own experience with brush tools (admittedly not in LiveCoode)
is that they draw a non-uniform coloured line that is no good at all
if you are looking for something to later recolour with a paint-bucket tool.

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 1:08 pm
by jmburnod
Hi Richmond
Thanks for the image (I was lazy this morning)
I suspect that the paint tools in LiveCode detect subtle differences in the colour of your initial
shapes . . .
Yes,
I think your shapes look 100% uniform to the human eye, but not to the computer.
Yes, but how can i produce it with standard brush and color from tools palette?

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 3:43 pm
by jmburnod
I tried using an image id as brush.
Same result I described in prev posts :(

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 6:19 pm
by richmond62
how can i produce it with standard brush and color from tools palette?
I don't think you can . . .

The paint tools are set up as . . . paint tools 8)

and paint tools are meant to work like a physical paintbrush and so forth:
if this is unclear go and get a paint brush, slop it in some paint and TRY
to paint a line with a hard margin and evenly distributed colour: you won't
manage that: AND we should be very, very grateful indeed,
because we would not have fantastic paintings if that were so.
Yo.jpg
Yo.jpg (69.39 KiB) Viewed 7363 times
Vector things such as graphic objects in LiveCode can be filled with
uniform colour for the simple reason that they are 'just' walls to contain paint,
and Tintoretto (who painted that picture) would have had a bad attack of
the dry boak.

If you take a close look at the revTools palette you will notice that the painting
"thingies" are divided into 2 groups:
paintTools.png
paintTools.png (15.3 KiB) Viewed 7363 times
Those ABOVE the red line are for VECTOR graphics, and those
BELOW
the red line are for PAINT (rasterised) graphics, and they
are like OIL and WATER: they just don't mix.

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 6:30 pm
by jmburnod
I don't think you can . . .
Yes, I can.
I create the two images i posted in the stack with standard brush and colors.
There are paint image, no vector image

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 6:33 pm
by richmond62
Yes, I can.
I create the two images i posted in the stack with standard brush and colors.
There are paint image, no vector image
Indeed you did.

What you CANNOT do, however, is rely on what you create to be a single,
solid colour so you can subsequently fill it with a different colour using
the bucket tool.

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 7:42 pm
by jmburnod
What you CANNOT do, however, is rely on what you create to be a single,
solid colour
I don't create anything, I just use livecode tools to create an single and solid color, but it doesn't work.
I attached a demo stack to watch what happens
stBucketIssueDemo.livecode.zip
(2.91 KiB) Downloaded 165 times

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 8:11 pm
by richmond62
I don't create anything
Well, the computer doesn't do it by itself.

I downloaded your DEMO and got this:
Screen Shot 2017-12-31 at 9.03.09 pm.png
Screen Shot 2017-12-31 at 9.03.09 pm.png (3.79 KiB) Viewed 7343 times
Which, is, obviously, a load of rubbish.

So, I modified your script to produce this:
Screen Shot 2017-12-31 at 9.06.27 pm.png
Screen Shot 2017-12-31 at 9.06.27 pm.png (3.7 KiB) Viewed 7343 times
and exported is as a PNG image, and then opened it in GIMP.

This FILLED evenly with a single colour:
filled.png
filled.png (461 Bytes) Viewed 7343 times
Which DOES suggest there is something wrong with LiveCode's bucket tool

(apologies for earlier comments).

Re: Paint bucket issue

Posted: Sun Dec 31, 2017 8:20 pm
by [-hh]
Hi J-M,

the bucket tool is designed for filling closed shapes, especially closed shapes drawn with the line tool. It should not fill the bordering lines.

Trying to fill the border lines itself would need another flood fill algorithm that is not available in the paint tools.

For example if you draw (freehand) an closed oval shape of radius 20 with a linesize of 10 then this will be filled perfectly by clicking _inside_, not on a pixel of the bordering line. But trying to fill _the line itself_ shows the "bug" that you describe.

@ALL: Have a nice end of 2017!

H.

Re: Paint bucket issue

Posted: Mon Jan 01, 2018 10:24 am
by richmond62
MetaCard.png
Oddly enough THIS does work using the MetaCard Paint Tools 8)

Re: Paint bucket issue

Posted: Mon Jan 01, 2018 11:20 am
by jmburnod
I was almost sure I used bucket with succes for what i described
I tested it with LC 4.6.3, bucket works.
I can fill a close area and change the color of a single and solid area perfectly