PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

FillRect and Opacity - weirdness.

Opacity with FillRect seems to work just fine when drawing it against another FillRect. However, it doesn't want to work when drawing it against regular graphics (I'm using CGapiRGBASurface). Am I doing something wrong or is this intentional?
Um. CGapiRGBASurface does not have a FillRect function. So it shouldn't work... :)
I guess I have a bad case of not explaining things too well. Let me try again. :)

I grab the backbuffer (which is a CGapiSurface) and do a FillRect on it to clear the background, I then do another FillRect on part of the screen with Opacity, and it works just fine.

Now, I have graphics which I draw with AlphaBlitFast, using the backbuffer. The graphics I'm drawing are CGapiRGBASurfaces. The background covers the entire screen. Now when I try a FillRect (on the backbuffer - a CGapiSurface) with Opacity, it doesn't do the Opacity.

I find this a little weird since it's just doing alpha blends. When I get time (I have a more serious problem atm) I'll test it some more.

EDIT:
Hm. I guess it just doesn't blend very well with some backgrounds (at least the one I'm using). Black won't blend at all (although it does with solid colors), and other colors refuse to blend until the value is < 50 (again, they blend find when overlaying on top of solid colors). I was mostly blending with 128 (the optimal blending according to the docs). But like I said, depending on the color used in FillRect and the background, there's a fairly strong chance that no blending is done at all.

I'm coming from a Photoshop background, and that's how I expected things to blend, similar to the way Photoshops layer opacity works. In fact, it did originally when overlaying on top of solid colors. It's just when using backgrounds with multiple colors, it can be quite stuborn, and in most cases no blend unless opacity is set very, very low. It's almost as if the blending range is 0-50 in these cases.

Oh well, on to more important things.