Page 2 of 3

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Mon Oct 05, 2020 5:29 pm
by sinisrus
Thank you

Is it possible to add Transparency color ?

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Wed Oct 07, 2020 6:33 pm
by airsoftsoftwair
sinisrus wrote: Mon Oct 05, 2020 5:29 pm Is it possible to add Transparency color ?
What do you mean by that?

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Thu Oct 08, 2020 2:07 pm
by sinisrus
For exemple if i use Function FloodFill(MyBrush, 50, 50, #NOCOLOR, #RED, 128) <= 128 is transparency value (0 at 255)

see result in picture (side right) :

https://ibb.co/Vwf6v1K

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Wed Oct 14, 2020 10:46 pm
by airsoftsoftwair
Should be possible to add.

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Mon Nov 23, 2020 5:13 pm
by airsoftsoftwair

Code: Select all

- New: FloodFill() now accepts an optional "AlphaChannel" table tag; if this is set to TRUE, FloodFill()
  will operate on the brush's alpha channel instead of on its color channels; when used in alpha channel
  mode, values in the range of 0 to 255 must be passed instead of RGB colors

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Fri Mar 26, 2021 3:24 pm
by sinisrus
Hello,

I can't seem to use FloodFill() with alphachannel can you put an example?

Thank you

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Sun Mar 28, 2021 3:11 pm
by airsoftsoftwair
Does this help?

Code: Select all

@DISPLAY {Color = #WHITE}

CreateBrush(1, 640, 480, #RED, {AlphaChannel = True})
SelectAlphaChannel(1)
Circle(#CENTER, #CENTER, 200)
EndSelect
FloodFill(1, 200, 200, #NOCOLOR, 128, {AlphaChannel = True})
DisplayBrush(1, #CENTER, #CENTER)
WaitLeftMouse
End

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Mon Mar 29, 2021 11:58 pm
by sinisrus
I test this and have message => Palette pen is out of range !

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Tue Mar 30, 2021 11:35 am
by SamuraiCrow
Alpha channel isn't available in 8 bit graphics modes.

Re: I looking function paint bucket type (dpaint ou ppaint)

Posted: Tue Mar 30, 2021 3:28 pm
by airsoftsoftwair
sinisrus wrote: Mon Mar 29, 2021 11:58 pm I test this and have message => Palette pen is out of range !
Oops, looks like this is a bug but it occurs only on some systems, e.g. it works correctly on Windows. However, you can easily work around it by just passing -1 instead of #NOCOLOR to FloodFill().