I looking function paint bucket type (dpaint ou ppaint)

Find quick help here to get you started with Hollywood
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

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

Post by sinisrus »

Thank you

Is it possible to add Transparency color ?
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

sinisrus wrote: Mon Oct 05, 2020 5:29 pm Is it possible to add Transparency color ?
What do you mean by that?
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

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

Post 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
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post by airsoftsoftwair »

Should be possible to add.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post 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
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

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

Post by sinisrus »

Hello,

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

Thank you
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post 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
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

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

Post by sinisrus »

I test this and have message => Palette pen is out of range !
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

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

Post by SamuraiCrow »

Alpha channel isn't available in 8 bit graphics modes.
I'm on registered MorphOS using FlowStudio.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

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

Post 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().
Post Reply