improperly drawn :: standart values of SetBlend

BlitzMax Forums/BlitzMax Programming/improperly drawn :: standart values of SetBlend

DivineDominion(Posted 2005) [#1]
Hi

I tried to draw an image with the flags MASKEDIMAGE and DYNAMICIMAGE, so its not smoothed, that worked fine until today.

Its about a thing like dynamite, where I want to show particles when it's thrown. I implemented them and then it struck me, that I can't find the proper values to unset SetBlend, I think.

SetBlend LIGHTBLEND
SetAlpha Self.alpha
SetColor 255, 255, 0
'Draw
SetBlend SOLIDBLEND
SetAlpha 1
SetColor 255, 255, 255


I thought this were the standard values of these expressions, but when I call the method, the dynamites mask is black and its somehow blurry. Looks like the color "white" is standard, because it then doesnt affect the dynamite when its drawn. removing SetBlend fixes it, so it must be SOLIDBLEND, that's not correct.

What do I have to do to draw the dynamite, which shan't be affected, properly?

Thanks in advance!


---
Edit:

It's MASKBLEND, not SOLIDBLEND. It's working now. I'm wondering why I didn't look at the help ...


ImaginaryHuman(Posted 2005) [#2]
Well, SetColor acts as a tint color on any drawing. If you don't want a tint you should set it to white. I notice you've set it to yellow. Secondly, SOLIDBLEND is the normal drawing method, it should work. It worked for me. I don't think you have to set the alpha back to 1, it is ignored in solidblend.

Also, note you do not necessarily need a mask to render LIGHTBLENDed objects with a masked outline. Instead, anything that is pure black $00,$00,$00 in the image will, in effect, make no apparent change to anything underneath it in the backbuffer, because it adds 0 to the color values. Set your mask areas to black and it will be masked without having a mask in place. Presumably though you have some kind of graduated transparency (being particles and all).