Page 1 of 1

MixBrush()

Posted: Tue Jan 17, 2023 1:47 pm
by Lerio69
I create Brush 1 by drawing a path in it, than I load a second brush from png file, how can merge this two brushes?
I using MixBrush(1, 2, 128) and then I save Brush 1 as png, but second brush is not merged to first

This is what I have in Display
Image

Where the path is a Brush 1, and the red arrow is a Brush 2

This is the image saved using SaveBrush()
Image

It seems that the MixBrush() function doesn't work.

Re: MixBrush()

Posted: Sat Jan 28, 2023 10:13 pm
by airsoftsoftwair
MixBrush() is for blending two brushes. The arrow will end up in the top-left corner but since all pixels are invisible in that area in the target brush, you won't see it. If you want to copy the arrow to the path brush, just do something like this:

Code: Select all

SelectBrush(pathbrush, #SELMODE_COMBO, 2)
DisplayBrush(arrowbrush, x, y)
EndSelect
SaveBrush(pathbrush, ...)

Re: MixBrush()

Posted: Tue Feb 07, 2023 9:18 am
by Lerio69
Ahh ok, thanks.