I looking function paint bucket type (dpaint ou ppaint)
Re: I looking function paint bucket type (dpaint ou ppaint)
Thank you
Is it possible to add Transparency color ?
Is it possible to add Transparency color ?
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: I looking function paint bucket type (dpaint ou ppaint)
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
see result in picture (side right) :
https://ibb.co/Vwf6v1K
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: I looking function paint bucket type (dpaint ou ppaint)
Should be possible to add.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: I looking function paint bucket type (dpaint ou ppaint)
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
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: I looking function paint bucket type (dpaint ou ppaint)
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)
I test this and have message => Palette pen is out of range !
-
- Posts: 475
- Joined: Fri May 15, 2015 5:15 pm
- Location: Waterville, Minnesota USA
Re: I looking function paint bucket type (dpaint ou ppaint)
Alpha channel isn't available in 8 bit graphics modes.
I'm on registered MorphOS using FlowStudio.
- airsoftsoftwair
- Posts: 5433
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: I looking function paint bucket type (dpaint ou ppaint)
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().