Page 1 of 1
Problem with TrimBrush
Posted: Thu Sep 06, 2018 11:05 pm
by sinisrus
Hello,
If i use
TrimBrush() with empty brush hollywood return error
Is there a function to know if the brush is empty ?
Code: Select all
CreateBrush(1,50,50,#BLACK, {AlphaChannel = True, Clear = True})
Local X,Y =TrimBrush(1)
Debugprint(X,Y)
Re: Problem with TrimBrush
Posted: Fri Sep 07, 2018 10:54 pm
by airsoftsoftwair
No, you'd have to examine every pixel in the alpha channel or mask to tell if a brush is "empty".
Re: Problem with TrimBrush
Posted: Fri Sep 07, 2018 11:45 pm
by sinisrus
This solution is too slow
Can you create an IsBrushEmpty () or TrimBrush () function returns -1, -1 if the brush is empty?
Please, it's very important for my project
Thank you for your reply
Re: Problem with TrimBrush
Posted: Sat Sep 08, 2018 10:19 pm
by airsoftsoftwair
Ok, should be possible to add because the code is already in
TrimBrush().
Re: Problem with TrimBrush
Posted: Sat Sep 08, 2018 11:42 pm
by sinisrus
Nice thank you
Re: Problem with TrimBrush
Posted: Sat Dec 01, 2018 3:59 pm
by airsoftsoftwair
Code: Select all
- New: Added IsBrushEmpty() function; this returns TRUE in case a brush has an alpha channel or a
mask and all pixels are invisible